From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3113 invoked by alias); 17 Jan 2007 21:20:06 -0000 Received: (qmail 3041 invoked by uid 22791); 17 Jan 2007 21:20:05 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 17 Jan 2007 21:20:00 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l0HLJvhT025282 for ; Wed, 17 Jan 2007 16:19:57 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l0HLJvXI016475 for ; Wed, 17 Jan 2007 16:19:57 -0500 Received: from [10.11.14.211] (vpn-14-211.rdu.redhat.com [10.11.14.211]) by potter.sfbay.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l0HLJt4u004003 for ; Wed, 17 Jan 2007 16:19:55 -0500 Message-ID: <45AE92FA.80705@redhat.com> Date: Wed, 17 Jan 2007 21:20:00 -0000 From: Dave Brolley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: sid@sources.redhat.com Subject: [patch][commit] Dangling Pointer Content-Type: multipart/mixed; boundary="------------010009060205000904050903" X-IsSubscribed: yes Mailing-List: contact sid-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sourceware.org X-SW-Source: 2007-q1/txt/msg00006.txt.bz2 This is a multi-part message in MIME format. --------------010009060205000904050903 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 265 Hi, I've committed the attached patch which corrects a problem with a dangling pointer in sid/component/cfgroot/libltdl. The comment in the code explains the problem. Is there an upstream repository for this library that should also be examined/updated? Dave --------------010009060205000904050903 Content-Type: text/plain; name="sid-crash.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sid-crash.ChangeLog" Content-length: 172 2007-01-17 Dave Brolley * libltdl/ltdl.c (lt_dlexit): After each call to lt_dlclose, make sure that the handle pointed to by 'cur' still exists. --------------010009060205000904050903 Content-Type: text/plain; name="sid-crash.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sid-crash.patch.txt" Content-length: 1387 Index: sid/component/cfgroot/libltdl/ltdl.c =================================================================== RCS file: /cvs/src/src/sid/component/cfgroot/libltdl/ltdl.c,v retrieving revision 1.3 diff -c -p -r1.3 ltdl.c *** sid/component/cfgroot/libltdl/ltdl.c 4 Jun 2005 03:23:01 -0000 1.3 --- sid/component/cfgroot/libltdl/ltdl.c 17 Jan 2007 21:13:53 -0000 *************** *** 1,5 **** /* ltdl.c -- system independent dlopen wrapper ! Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc. Originally by Thomas Tanner This file is part of GNU Libtool. --- 1,5 ---- /* ltdl.c -- system independent dlopen wrapper ! Copyright (C) 1998, 1999, 2000, 2004, 2007 Free Software Foundation, Inc. Originally by Thomas Tanner This file is part of GNU Libtool. *************** lt_dlexit () *** 2330,2335 **** --- 2330,2344 ---- ++errors; } } + /* Make sure that the handle pointed to by 'cur' still exists. + lt_dlclose recursively closes dependent libraries which removes + them from the linked list. One of these might be the one + pointed to by 'cur'. */ + for (tmp = handles; tmp; tmp = tmp->next) + if (tmp == cur) + break; + if (! tmp) + cur = handles; } /* done if only resident modules are left */ if (!saw_nonresident) --------------010009060205000904050903--