gecko-dev/mozglue/linker
Jim Chen f61f04949b Bug 1451891 - Fix race conditions in __wrap_dlerror; r=glandium
__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
2018-07-25 13:59:30 -04:00
..
tests Bug 1471620 - Skip python-tests locally that don't run with python 3 in CI r=davehunt 2018-06-27 11:10:02 -04:00
BaseElf.cpp
BaseElf.h Bug 1448029 - make constructors in the linker explicit; r=glandium 2018-03-27 10:51:32 -04:00
CustomElf.cpp Bug 1448029 - make constructors in the linker explicit; r=glandium 2018-03-27 10:51:32 -04:00
CustomElf.h
ElfLoader.cpp Bug 1451891 - Fix race conditions in __wrap_dlerror; r=glandium 2018-07-25 13:59:30 -04:00
ElfLoader.h Bug 1451891 - Fix race conditions in __wrap_dlerror; r=glandium 2018-07-25 13:59:30 -04:00
Elfxx.h Bug 1428182 - 3. Only include <linux/elf.h> for non-unified headers; r=glandium 2018-01-30 14:08:22 -05:00
Logging.h Bug 1414506 - Drive-by: Remove MOZ_CONCAT definition from mozglue/linker/Logging.h. r=froydnj 2018-01-19 20:12:04 +09:00
Mappable.cpp Bug 1459722 - Remove zxx_stream. r=froydnj 2018-05-10 11:45:23 +09:00
Mappable.h Bug 1459722 - Remove zxx_stream. r=froydnj 2018-05-10 11:45:23 +09:00
Utils.h Bug 1450793 - Don't assume 4k page size r=glandium 2018-04-13 08:46:35 -05:00
XZStream.cpp Bug 1414506 - Drive-by: Add missing <cstring> include to XZStream.cpp. r=froydnj 2018-01-19 20:08:08 +09:00
XZStream.h Bug 1380204: Improve error handling in XZStream.cpp r=glandium 2017-07-11 17:45:07 -07:00
Zip.cpp Bug 1459722 - Remove zxx_stream. r=froydnj 2018-05-10 11:45:23 +09:00
Zip.h Bug 1459722 - Remove zxx_stream. r=froydnj 2018-05-10 11:45:23 +09:00
moz.build Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium 2017-12-07 22:09:15 +01:00