зеркало из https://github.com/mozilla/gecko-dev.git
f61f04949b
__wrap_dlerror uses a single pointer for all threads, which means one thread could get the dlerror result from another thread. Normally this wouldn't cause crashes. However, because dlerror results come from a per-thread buffer, if a thread exits and our saved dlerror result came from that thread, the saved pointer could then refer to invalid memory. The proper way to fix this is to use TLS and have a per-thread pointer for __wrap_dlerror. However, instead of using up a TLS slot, this patch keeps the single pointer for custom messages, and fallback to per-thread dlerror call for system messages. While the race condition still exists, I think the risk is acceptable. Even when races occur, they should no longer cause crashes. MozReview-Commit-ID: 4hGksidjiVz --HG-- extra : rebase_source : 373000686c426b81ffd7cee88264e89b7a733957 |
||
---|---|---|
.. | ||
tests | ||
BaseElf.cpp | ||
BaseElf.h | ||
CustomElf.cpp | ||
CustomElf.h | ||
ElfLoader.cpp | ||
ElfLoader.h | ||
Elfxx.h | ||
Logging.h | ||
Mappable.cpp | ||
Mappable.h | ||
Utils.h | ||
XZStream.cpp | ||
XZStream.h | ||
Zip.cpp | ||
Zip.h | ||
moz.build |