mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-31 14:01:18 +08:00
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. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
aecbe50c9d
commit
d2b997c717
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user