diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-02-16 00:21:33 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-02-16 00:21:33 +0000 |
commit | b209e34ad62446d73e5b83ef3cf3a874d2da57d3 (patch) | |
tree | 5812cb8f92795a12343a187882e225bbc09196d3 /elf/dl-open.c | |
parent | ebda6173fc0fa6b91fa30f1ea83ddb89baec66b9 (diff) | |
download | glibc-b209e34ad62446d73e5b83ef3cf3a874d2da57d3.tar glibc-b209e34ad62446d73e5b83ef3cf3a874d2da57d3.tar.gz glibc-b209e34ad62446d73e5b83ef3cf3a874d2da57d3.tar.bz2 glibc-b209e34ad62446d73e5b83ef3cf3a874d2da57d3.zip |
Update.
2002-02-15 Ulrich Drepper <drepper@redhat.com>
* elf/dl-open.c (dl_open_worker): Catch wrap-around of TLS
generation counter.
* elf/dl-close.c (_dl_close): Likewise.
Diffstat (limited to 'elf/dl-open.c')
-rw-r--r-- | elf/dl-open.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/elf/dl-open.c b/elf/dl-open.c index 6fcfcce3ce..5710ffb40f 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -21,6 +21,7 @@ #include <dlfcn.h> #include <errno.h> #include <libintl.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -431,7 +432,8 @@ dl_open_worker (void *a) /* Bump the generation number if necessary. */ if (any_tls) - ++GL(dl_tls_generation); + if (__builtin_expect (++GL(dl_tls_generation) == 0, 0)) + __libc_fatal (gettext ("TLS generation counter wrapped! Please send report with the 'glibcbug' script.")); #endif /* Run the initializer functions of new objects. */ |