From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23574 invoked by alias); 27 Nov 2012 15:47:33 -0000 Received: (qmail 23552 invoked by uid 48); 27 Nov 2012 15:47:32 -0000 From: "tromey at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/14290] gdb_bfd_unref frees an already freed memory block Date: Tue, 27 Nov 2012 15:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: tromey at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2012-q4/txt/msg00310.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14290 --- Comment #7 from Tom Tromey 2012-11-27 15:47:29 UTC --- Thanks for the analysis. For submitting patches see: http://sourceware.org/gdb/contribute/ I read this patch and I think it may still have problems, although it is definitely an improvement over the status quo. First, darwin_bfd_open leaks 'abfd'. Second, if we close 'abfd' then the dependent BFD probably breaks. One approach would be to write a wrapper for bfd_mach_o_fat_extract along the lines of gdb_bfd_openr_next_archived_file. I'll upload a patch shortly. I'd appreciate it if you could try it out and see whether it fixes your problem. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.