From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11191 invoked by alias); 29 Aug 2012 08:14:37 -0000 Received: (qmail 11173 invoked by uid 22791); 29 Aug 2012 08:14:35 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_BJ X-Spam-Check-By: sourceware.org Received: from mail-vc0-f169.google.com (HELO mail-vc0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Aug 2012 08:13:57 +0000 Received: by vcbfl13 with SMTP id fl13so352882vcb.0 for ; Wed, 29 Aug 2012 01:13:56 -0700 (PDT) Received: by 10.220.221.18 with SMTP id ia18mr565749vcb.62.1346228036925; Wed, 29 Aug 2012 01:13:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.221.1.205 with HTTP; Wed, 29 Aug 2012 01:13:36 -0700 (PDT) In-Reply-To: <87zk5eer7s.fsf@fleche.redhat.com> References: <87k3wpr9uy.fsf@fleche.redhat.com> <87sjbdo2z4.fsf@fleche.redhat.com> <87wr0kgumi.fsf@fleche.redhat.com> <87zk5eer7s.fsf@fleche.redhat.com> From: Kevin Pouget Date: Wed, 29 Aug 2012 08:14:00 -0000 Message-ID: Subject: Re: GDB crashing because of Python To: Tom Tromey Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00091.txt.bz2 On Tue, Aug 28, 2012 at 9:44 PM, Tom Tromey wrote: > Kevin> so based on `git bisect`, it looks like the errors were introduced by > Kevin> this commit: > > Tom> Can you please try the appended patch? > > I spent some time today trying to make a robust test case for this. > I can see the error clearly with valgrind, but I can't make it crash. > Printing the Objfile reference counts "works" but it seems to not be > very robust -- in the failing case the count appears to be 12 on my > machine, but of course this is just a fluke, and it could well be > anything. > > -lmcheck unfortunately doesn't help, because Python is typically built > using its own allocator. It would be nice if we could disable this for > the test suite -- it is automatically disabled under valgrind (under > some typical configurations), so it could be done cheaply -- but this > isn't available. > > Anyway, I'm going to write a ChangeLog and send it to the patch list. > > Tom Hello, Thanks, the patch of the previous email seems to resolve all the bugs I detailed! I was thinking that it's strange that I'm the only one seeing this bug from a file *I* committed ... but maybe I'm the only one actually using the feature! Did you try to register a Python handler to `gdb.events.new_objfile` to trigger the bug? (gdb/trunk doesn't not crash anymore if I remove the connection from my init files) Cordially, Kevin