gecko-dev/mozglue
Jim Chen 9d10605784 Bug 1460989 - Hold system linker lock while modifying debug map. r=glandium, a=RyanVM
When we modify the debug map, we could be racing with the system linker,
either when we modify the entries or when we change page protection
flags. To fix the race, we need to take the system linker's internal
lock when we perform any kind of modification on the debug map.

One way to hold the system linker lock is to call dl_iterate_phdr, and
perform our actions inside the callback, which is invoked with the
lock being held. However, dl_iterate_phdr is only present on Android
5.0+, and even then, dl_iterate_phdr is only protected by the linker
lock on Android 6.0+.

This means that with this patch, we can only safely modify the debug map
on Android 6.0+, which I think is acceptable for an operation that only
benefits a debugger.

MozReview-Commit-ID: BowBEO8tu8Z

--HG--
extra : amend_source : 837631dfc2ef17b24ffe5778bcb70dc29b7dfc66
2018-06-15 04:24:10 -04:00
..
android Bug 1448032 - use SprintfLiteral in some android glue code; r=glandium 2018-03-27 10:51:31 -04:00
build Bug 1467731: Prevent WinVerifyTrust from hitting the network; r=aklotz 2018-06-08 12:45:09 +02:00
linker Bug 1460989 - Hold system linker lock while modifying debug map. r=glandium, a=RyanVM 2018-06-15 04:24:10 -04:00
misc Bug 1452204 part 2 - Use RtlCaptureContext to capture context for current thread and remove walker thread. r=glandium 2018-06-04 19:23:27 +10:00
tests Bug 1460407: Fix printf format warning in TestDllInterceptorCrossProcess.cpp. r=aklotz 2018-05-09 16:16:20 -04:00
moz.build Bug 1407468 - Replace multiple !JS_STANDALONE with MOZ_WIDGET_TOOLKIT. r=mshal 2017-10-05 14:50:01 +09:00