This is the mail archive of the
mailing list for the Archer project.
Re: [patch] Fix for heap corruption in python pretty printing.
- From: "Paul Pluzhnikov" <ppluzhnikov at google dot com>
- To: "Tom Tromey" <tromey at redhat dot com>
- Cc: archer at sourceware dot org
- Date: Tue, 21 Oct 2008 19:43:41 -0700
- Subject: Re: [patch] Fix for heap corruption in python pretty printing.
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta;t=1224643424; bh=1YdlbgeQ/MHwTKcMNuCLsosw+cA=;h=DomainKey-Signature:Message-ID:Date:From:To:Subject:Cc: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-Disposition:References; b=XYYl80HZ1ifRP1j3rVr/xw3/WouTNp/sMsRqla6y8g85en39PfIapBg23gecidZRiTZ7bmgSnTP0OQFOe4rRug==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns;h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;b=HcMJQusVw20oxDAmvu2VQWMmiZEDvrISss4giMHg08vT7ktuqAdlzx0VhvFSzoS1EX6vPJxBX37ZrIWUgLCdNQ==
- References: <firstname.lastname@example.org> <email@example.com>
On Tue, Oct 21, 2008 at 4:55 PM, Tom Tromey <firstname.lastname@example.org> wrote:
>>>>>> "Paul" == Paul Pluzhnikov <email@example.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.
> This looks like a longstanding bug. I wonder why we haven't hit it
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 ...