diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2020-12-30 23:40:14 +0000 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2021-02-15 12:05:21 +0000 |
commit | f774573828499855b342793fca5cbad8c6814190 (patch) | |
tree | 741d63283fb23d3cd7170f3180060f661dabaa8b | |
parent | 4cfc16dfcd5045c91faa1ec363ffa40a7a34dfe2 (diff) | |
download | glibc-f774573828499855b342793fca5cbad8c6814190.tar.gz glibc-f774573828499855b342793fca5cbad8c6814190.tar.xz glibc-f774573828499855b342793fca5cbad8c6814190.zip |
elf: Fix a DTV setup issue [BZ #27136]
The max modid is a valid index in the dtv, it should not be skipped. The bug is observable if the last module has modid == 64 and its generation is same or less than the max generation of the previous modules. Then dtv[0].counter implies dtv[64] is initialized but it isn't. Fixes bug 27136.
-rw-r--r-- | elf/dl-tls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/dl-tls.c b/elf/dl-tls.c index dd76829e74..79b93ad91b 100644 --- a/elf/dl-tls.c +++ b/elf/dl-tls.c @@ -590,7 +590,7 @@ _dl_allocate_tls_init (void *result) } total += cnt; - if (total >= GL(dl_tls_max_dtv_idx)) + if (total > GL(dl_tls_max_dtv_idx)) break; listp = listp->next; |