This is the mail archive of the mailing list for the Archer project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: uninitialized memory, pretty printers and full backtraces

On Thu, Jan 22, 2009 at 7:18 AM, Phil Muldoon <> wrote:
> I was working on another pretty printing task, when I noted the behaviour
> below. I'm not sure how to fix it. Thought it worth discussing here.
> The basic premise is that in a "bt full" condition, the pretty printers
> appear to try and grok (and pretty print) all local variables in a frame -
> even if they are not initialized at the time the "bt full" was requested.  I
> believe this is not so different from existing GDB behaviour.  But with the
> Python pretty printers, the problem  is magnified as the printers will
> attempt to read, and interpret assorted random memory addresses in an
> uninitialized class.

I've seen that as well, thanks for bringing this up.

One possible way to fix this is to fall back to "raw print" if the python
pretty printer throws exception.

This will make it harder to debug python pretty-printers themselves:
it would make it appear that they are not "firing" if there is a problem
with python code. But perhaps logging exception only when "set verbose on"
is in effect is sufficient to overcome this.

Paul Pluzhnikov

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]