diff options
author | Carlos O'Donell <carlos@redhat.com> | 2014-02-25 13:00:36 -0500 |
---|---|---|
committer | Carlos O'Donell <carlos@redhat.com> | 2014-02-25 13:18:15 -0500 |
commit | d050367659e04685a0eab910e86ea6829a8d24f9 (patch) | |
tree | eb094a22fb28449c7723b9463c388505ca31a5a3 /elf/tst-auditmod9a.c | |
parent | 4cbf380ce948ca15a965a78f0c1a092cf5956792 (diff) | |
download | glibc-d050367659e04685a0eab910e86ea6829a8d24f9.tar.gz glibc-d050367659e04685a0eab910e86ea6829a8d24f9.tar.xz glibc-d050367659e04685a0eab910e86ea6829a8d24f9.zip |
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
Diffstat (limited to 'elf/tst-auditmod9a.c')
-rw-r--r-- | elf/tst-auditmod9a.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/elf/tst-auditmod9a.c b/elf/tst-auditmod9a.c new file mode 100644 index 0000000000..7213ade123 --- /dev/null +++ b/elf/tst-auditmod9a.c @@ -0,0 +1,15 @@ +#include <stdint.h> + +__thread int var; + +unsigned int +la_version (unsigned int v) +{ + return v; +} + +void +la_activity (uintptr_t *cookie, unsigned int flag) +{ + ++var; +} |