DescriptionCrazy linker fix for
https://code.google.com/p/chromium/issues/detail?id=355595
There is a race between the crazy linker running on the native thread and the system linker running at the same time on the main UI thread, It can show up in several places, but in its simplest incarnation appears as:
--- crazy linker on native thread
mprotect page writable
--- system linker on main thread
mprotect page writable
write it
mprotect page readonly
--- crazy linker on native thread
write it [ <- sigsegv, page readonly (code=2) ]
mprotect page readonly [ not reached ]
The patch moves the crazy linker's r_map update calls so that they execute on the main UI thread. This ensures that the crazy linker sets these pages writable and then readonly once done synchronously with system linker activity.
Companion to:
https://googleplex-android-review.git.corp.google.com/#/c/448556/
BUG=355595
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270084
Patch Set 1 : #Patch Set 2 : Tidy up style. #
Total comments: 10
Patch Set 3 : #Patch Set 4 : #Patch Set 5 : #Patch Set 6 : #Patch Set 7 : Call crazy_library_close_with_context() to close. #Patch Set 8 : #Patch Set 9 : #
Total comments: 4
Patch Set 10 : Update for review feedback. #
Messages
Total messages: 8 (0 generated)
|