Correctly report native-lib filenames when still packed in APK files #1705
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal
Ensure that
.so
files are reported by name (where possible) when the native libraries are not extracted from the.apk
file. When packaged correctly, the operating system may load the.so
files from within the.apk
file in order to save space and time (see extractNativeLibs and useLegacyPackaging for more information).Symbols for these files were sometimes being reported as coming from
base.apk
instead of the expected.so
file, and as a result were not displaying the correct symbols on the Dashboard.Changes
Updated the
dladdr
fallback logic in the stack unwinder to look for filenames ending in.apk
. If these are found, the filename is either resolved from theElf.soname
(in the case of handled errors) ordladdr
(in the case of signals).Testing
The test fixtures now use
extractNativeLibs=false
which previously would cause them to fail when the symbols could not be read. Thesymbolicate
function used by Mazerunner now looks for the!
indicator in filenames, and retrieves the correct filename when symbolicating native stack traces for tests.Notes
dladdr
on Android 6 reportsbase.apk
as the filename if the library has not been unpacked, so one of our existing scenarios (Causing a crash in a separate library /CXXExternalStackElementScenario
) cannot correctly report its filename. This scenario is now skipped on Android 6.