mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-04 15:13:53 +08:00
[BZ #3429]
2006-10-27 Ulrich Drepper <drepper@redhat.com> [BZ #3429] * elf/dl-open.c (dl_open_worker): Keep holding dl_load_lock until we are sure we do not need it anymore for _dl_close. ALso move the asserts inside the lock region. Patch mostly by Suzuki <suzuki@in.ibm.com>.
This commit is contained in:
parent
c0a777e8d0
commit
b2369ca3ff
@ -1,3 +1,11 @@
|
|||||||
|
2006-10-27 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
[BZ #3429]
|
||||||
|
* elf/dl-open.c (dl_open_worker): Keep holding dl_load_lock until
|
||||||
|
we are sure we do not need it anymore for _dl_close. ALso move
|
||||||
|
the asserts inside the lock region.
|
||||||
|
Patch mostly by Suzuki <suzuki@in.ibm.com>.
|
||||||
|
|
||||||
2006-10-27 Jakub Jelinek <jakub@redhat.com>
|
2006-10-27 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* elf/dl-lookup.c (_dl_debug_bindings): Remove unised symbol_scope
|
* elf/dl-lookup.c (_dl_debug_bindings): Remove unised symbol_scope
|
||||||
|
@ -567,15 +567,9 @@ no more namespaces available for dlmopen()"));
|
|||||||
_dl_unload_cache ();
|
_dl_unload_cache ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Release the lock. */
|
/* See if an error occurred during loading. */
|
||||||
__rtld_lock_unlock_recursive (GL(dl_load_lock));
|
|
||||||
|
|
||||||
if (__builtin_expect (errstring != NULL, 0))
|
if (__builtin_expect (errstring != NULL, 0))
|
||||||
{
|
{
|
||||||
/* Some error occurred during loading. */
|
|
||||||
char *local_errstring;
|
|
||||||
size_t len_errstring;
|
|
||||||
|
|
||||||
/* Remove the object from memory. It may be in an inconsistent
|
/* Remove the object from memory. It may be in an inconsistent
|
||||||
state if relocation failed, for example. */
|
state if relocation failed, for example. */
|
||||||
if (args.map)
|
if (args.map)
|
||||||
@ -595,9 +589,15 @@ no more namespaces available for dlmopen()"));
|
|||||||
_dl_close (args.map);
|
_dl_close (args.map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert (_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT);
|
||||||
|
|
||||||
|
/* Release the lock. */
|
||||||
|
__rtld_lock_unlock_recursive (GL(dl_load_lock));
|
||||||
|
|
||||||
/* Make a local copy of the error string so that we can release the
|
/* Make a local copy of the error string so that we can release the
|
||||||
memory allocated for it. */
|
memory allocated for it. */
|
||||||
len_errstring = strlen (errstring) + 1;
|
size_t len_errstring = strlen (errstring) + 1;
|
||||||
|
char *local_errstring;
|
||||||
if (objname == errstring + len_errstring)
|
if (objname == errstring + len_errstring)
|
||||||
{
|
{
|
||||||
size_t total_len = len_errstring + strlen (objname) + 1;
|
size_t total_len = len_errstring + strlen (objname) + 1;
|
||||||
@ -614,14 +614,15 @@ no more namespaces available for dlmopen()"));
|
|||||||
if (malloced)
|
if (malloced)
|
||||||
free ((char *) errstring);
|
free ((char *) errstring);
|
||||||
|
|
||||||
assert (_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT);
|
|
||||||
|
|
||||||
/* Reraise the error. */
|
/* Reraise the error. */
|
||||||
_dl_signal_error (errcode, objname, NULL, local_errstring);
|
_dl_signal_error (errcode, objname, NULL, local_errstring);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert (_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT);
|
assert (_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT);
|
||||||
|
|
||||||
|
/* Release the lock. */
|
||||||
|
__rtld_lock_unlock_recursive (GL(dl_load_lock));
|
||||||
|
|
||||||
#ifndef SHARED
|
#ifndef SHARED
|
||||||
DL_STATIC_INIT (args.map);
|
DL_STATIC_INIT (args.map);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user