elfhack causes PGO'd Android builds to crash when loading libxul.so
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox-esr60 wontfix, firefox65 wontfix, firefox66 wontfix, firefox67 fixed)
People
(Reporter: mshal, Assigned: glandium)
References
Details
(Whiteboard: [geckoview:p1] [geckoview:fenix:p2])
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
I'm testing out PGO-enabled Android builds by generating an instrumented build (with -fprofile-generate=/data/local/tmp), and triggering the profile data writing by sending a signal to the native process via adb since the normal Android process shutdown doesn't call atexit() handlers. This gets us profile data for libxul.so, at least, which is then used on a subsequent build with -fprofile-use. Just mentioning this since these are differences from Linux PGO builds, which way or may not be relevant.
Unfortunately the final profile-use build crashes on startup when loading libxul.so, which glandium traced to a weird jump instruction in elfhack. Re-building the profile-use stage with --disable-elf-hack makes the crash go away, but we will ultimately need a fix in elfhack.
Assignee | ||
Comment 1•6 years ago
|
||
The problem is the address difference between the elfhack-inject code and the location of the original init function in libxul is too large for ARM instructions. Elfhack would need to detect this is the case and inject a trampoline, or something akin to this.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
Updated•6 years ago
|
Reporter | ||
Comment 4•6 years ago
|
||
Yep, that works for me. Thanks for the quick fix!
Assignee | ||
Updated•6 years ago
|
Comment 6•6 years ago
|
||
bugherder |
Description
•