Skip to content
Commit 77523d5e authored by Florian Weimer's avatar Florian Weimer
Browse files

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: default avatarGabriel F. T. Gomes <gabrielftg@linux.ibm.com>
parent 2b26b084
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment