This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch addresses another issue highlighted by the recent "isolate erroneous path" patch applied to gcc trunk. The failure mechanism is similar to: https://sourceware.org/ml/libc-alpha/2013-11/msg00291.html In this case htab_find_slot() may result in a call to calloc() and hence may return NULL. The code in _dl_make_tlsdesc_dynamic does not check the return value from htab_find_slot before dereferencing it. The "isolate erroneous path" code in trunk gcc spots the ill defined behaviour and inserts an abort(), this leads to a link error for at least ARM and AArch64 builds of glibc. This patch adds a check on the return value, I think the fix is obvious, if I'll commit tomorrow if I don't get any objections. Cheers /Marcus * elf/tlsdeschtab.h (_dl_make_tlsdesc_dynamic): Handle failure of htab_find_slot().
Attachment:
0001-Handle-failure-in-htab_find_slot.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |