From: Dave Brolley <brolley@redhat.com>
To: sid@sources.redhat.com
Subject: [patch][commit] Dangling Pointer
Date: Wed, 17 Jan 2007 21:20:00 -0000 [thread overview]
Message-ID: <45AE92FA.80705@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 265 bytes --]
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
[-- Attachment #2: sid-crash.ChangeLog --]
[-- Type: text/plain, Size: 172 bytes --]
2007-01-17 Dave Brolley <brolley@redhat.com>
* libltdl/ltdl.c (lt_dlexit): After each call to lt_dlclose, make sure
that the handle pointed to by 'cur' still exists.
[-- Attachment #3: sid-crash.patch.txt --]
[-- Type: text/plain, Size: 1387 bytes --]
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 <tanner@ffii.org>
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 <tanner@ffii.org>
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)
next reply other threads:[~2007-01-17 21:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-17 21:20 Dave Brolley [this message]
2007-01-18 3:56 ` Frank Ch. Eigler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45AE92FA.80705@redhat.com \
--to=brolley@redhat.com \
--cc=sid@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).