From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13502 invoked by alias); 13 Dec 2007 03:27:34 -0000 Received: (qmail 13494 invoked by uid 22791); 13 Dec 2007 03:27:33 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Dec 2007 03:27:27 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 8F56298021; Thu, 13 Dec 2007 03:27:25 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 6A09B98020; Thu, 13 Dec 2007 03:27:25 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1J2ejM-0006jd-7c; Wed, 12 Dec 2007 22:27:24 -0500 Date: Thu, 13 Dec 2007 03:27:00 -0000 From: Daniel Jacobowitz To: Doug Evans Cc: gdb@sourceware.org Subject: Re: protection from dangling pointers in dwarf info when .so's go away Message-ID: <20071213032724.GA25868@caradoc.them.org> Mail-Followup-To: Doug Evans , gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-12-11) 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: 2007-12/txt/msg00083.txt.bz2 On Wed, Dec 12, 2007 at 05:57:58PM -0800, Doug Evans wrote: > Is it the case that vptr_basetype for myclass should never have gotten > assigned a value pointing into a .so (or any other obstack)? Sounds likely to me, but may not be practical. > Or is > gdb supposed to have cleaned up after itself when the .so data got > freed? We do this for user variables when their objfile goes away, by recursively copying their type. We don't walk types from other objfiles looking for pointers, so there really shouldn't be any. > Or something else? Any guidance on where the fix should go is > appreciated. I suppose an easy solution is to toss out all info, not > just for .so's, though that will slow down re-runs. No, that's impossible. Remember dlopen and dlclose. -- Daniel Jacobowitz CodeSourcery