public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/28503] New: dl_iterate_phdr namespace violation
@ 2021-10-27 6:23 fweimer at redhat dot com
2021-12-28 21:55 ` [Bug dynamic-link/28503] " cvs-commit at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: fweimer at redhat dot com @ 2021-10-27 6:23 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28503
Bug ID: 28503
Summary: dl_iterate_phdr namespace violation
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: dynamic-link
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
Target Milestone: ---
The program below aborts even though it does nothing wrong. The reason is that
the libgcc_s unwinder calls dl_iterate_phdr, which is not in the implementation
namespace, so the application should be able to define it in a different way.
#define _POSIX_SOURCE
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
void
dl_iterate_phdr (void)
{
abort ();
}
static void *
thread_func (void *ignored)
{
pthread_exit (NULL);
return NULL;
}
int
main (void)
{
pthread_t thr;
if (pthread_create (&thr, NULL, thread_func, NULL) != 0)
{
puts ("pthread_create failed");
return 1;
}
if (pthread_join (thr, NULL) != 0)
{
puts ("pthread_join failed");
return 1;
}
return 0;
}
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug dynamic-link/28503] dl_iterate_phdr namespace violation
2021-10-27 6:23 [Bug dynamic-link/28503] New: dl_iterate_phdr namespace violation fweimer at redhat dot com
@ 2021-12-28 21:55 ` cvs-commit at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-28 21:55 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28503
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Florian Weimer <fw@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5d28a8962dcb6ec056b81d730e3c6fb57185a210
commit 5d28a8962dcb6ec056b81d730e3c6fb57185a210
Author: Florian Weimer <fweimer@redhat.com>
Date: Tue Dec 28 22:52:56 2021 +0100
elf: Add _dl_find_object function
It can be used to speed up the libgcc unwinder, and the internal
_dl_find_dso_for_object function (which is used for caller
identification in dlopen and related functions, and in dladdr).
_dl_find_object is in the internal namespace due to bug 28503.
If libgcc switches to _dl_find_object, this namespace issue will
be fixed. It is located in libc for two reasons: it is necessary
to forward the call to the static libc after static dlopen, and
there is a link ordering issue with -static-libgcc and libgcc_eh.a
because libc.so is not a linker script that includes ld.so in the
glibc build tree (so that GCC's internal -lc after libgcc_eh.a does
not pick up ld.so).
It is necessary to do the i386 customization in the
sysdeps/x86/bits/dl_find_object.h header shared with x86-64 because
otherwise, multilib installations are broken.
The implementation uses software transactional memory, as suggested
by Torvald Riegel. Two copies of the supporting data structures are
used, also achieving full async-signal-safety.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-28 21:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 6:23 [Bug dynamic-link/28503] New: dl_iterate_phdr namespace violation fweimer at redhat dot com
2021-12-28 21:55 ` [Bug dynamic-link/28503] " cvs-commit at gcc dot gnu.org
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).