elf: Assign TLS modid later during dlopen [BZ #24930]
Commit a42faf59 ("Fix BZ #16634.") attempted to fix a TLS modid consistency issue by adding additional checks to the open_verify function. However, this is fragile because open_verify cannot reliably predict whether _dl_map_object_from_fd will later fail in the more complex cases (such as memory allocation failures). Therefore, this commit assigns the TLS modid as late as possible. At that point, the link map pointer will eventually be passed to _dl_close, which will undo the TLS modid assignment. Reviewed-by:Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
Loading
Please register or sign in to comment