This is the mail archive of the archer@sourceware.org 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: [patch] Fix for heap corruption in python pretty printing.


On Tue, Oct 21, 2008 at 4:55 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:
>
> Paul> Since Monday, pretty-printing started crashing on me with glibc
> Paul> 'double free' :(
>
> Paul> I've just committed attached patch, which demonstrates the problem
> Paul> in a simple test case and fixes it.
>
> Thanks.
>
> This looks like a longstanding bug.  I wonder why we haven't hit it
> before.

I've had somewhat hard time getting a small test case.

> Would you mind submitting this upstream as well?  This part of the
> value code appears there.

I can't seem to trigger the bug on mainline.

Could this be because .owned_by_gdb is left uninitialized, doesn't
happen to be zero, and so value_free() never fires?

Should I just check in the fix without creating a test case for it?

> I've just been checking in my changes without comment.  Would you
> prefer that I email them here with explanations?  I'm happy to do that
> if it would be useful to you.

Yes, it is sometimes hard to figure out what has changed and why.

I am much more used to the commit message containing an explanation
of 'why', but the GDB ChangeLog/commit message just says 'what',
and if you want to know the reason for change, you have to dig
through list archives :(

And if you don't explain changes in the list, then all hope of
finding out 'why' is lost ...

Thanks,
-- 
Paul Pluzhnikov


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