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>
}
total += cnt;
- if (total >= GL(dl_tls_max_dtv_idx))
+ if (total > GL(dl_tls_max_dtv_idx))
break;
listp = listp->next;