From d050367659e04685a0eab910e86ea6829a8d24f9 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 25 Feb 2014 13:00:36 -0500 Subject: BZ #16613: Support TLS in audit libraries. This commit fixes a bug where the dynamic loader would crash when loading audit libraries, via LD_AUDIT, where those libraries used TLS. The dynamic loader was not considering that the audit libraries would use TLS and failed to bump the TLS generation counter leaving TLS usage inconsistent after loading the audit libraries. https://sourceware.org/ml/libc-alpha/2014-02/msg00569.html --- elf/tst-audit9.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 elf/tst-audit9.c (limited to 'elf/tst-audit9.c') diff --git a/elf/tst-audit9.c b/elf/tst-audit9.c new file mode 100644 index 0000000000..0982d8b716 --- /dev/null +++ b/elf/tst-audit9.c @@ -0,0 +1,8 @@ +#include + +int main(void) +{ + void *h = dlopen("$ORIGIN/tst-auditmod9b.so", RTLD_LAZY); + int (*fp)(void) = dlsym(h, "f"); + return fp() - 1; +} -- cgit v1.2.1