0f40a05309
Recently, the maps for an elf in memory might show up looking like: f0000-f1000 0 r-- /system/lib/libc.so f1000-f2000 0 --- f2000-f3000 1000 r-x /system/lib/libc.so f3000-f4000 2000 rw- /system/lib/libc.so The problem is that there is logic in the code that assumed that the map before the execute map must be the read-only map. In the case above, this is not true. Add a new prev_real_map that will point to the previous map that is not one of these empty maps. This will fix the backtraces that look like this: #00 pc 0000000000050d58 /apex/com.android.runtime/lib64/bionic/libc.so!libc.so (offset 0x50000) (syscall+24) (BuildId: 5252408bf30e395d49ee270b54c77ca4) To get rid of the !libc.so and the offset value, which is not correct. Added new unit tests to verify this. Added new offline test which an empty map between read-only and execute map. Before this change, the backtraces had lines like libc.so!libc.so (offset XXX) would be present. Bug: 148075852 Test: Ran unit tests. Change-Id: Ie04bfc96b8f91ed885cb1e655cf1e346efe48a45 |
||
---|---|---|
.. | ||
DexFiles.h | ||
DwarfError.h | ||
DwarfLocation.h | ||
DwarfMemory.h | ||
DwarfSection.h | ||
DwarfStructs.h | ||
Elf.h | ||
ElfInterface.h | ||
Error.h | ||
Global.h | ||
JitDebug.h | ||
LocalUnwinder.h | ||
Log.h | ||
MachineArm.h | ||
MachineArm64.h | ||
MachineMips.h | ||
MachineMips64.h | ||
MachineX86.h | ||
MachineX86_64.h | ||
MapInfo.h | ||
Maps.h | ||
Memory.h | ||
Regs.h | ||
RegsArm.h | ||
RegsArm64.h | ||
RegsGetLocal.h | ||
RegsMips.h | ||
RegsMips64.h | ||
RegsX86.h | ||
RegsX86_64.h | ||
UcontextArm.h | ||
UcontextArm64.h | ||
UcontextMips.h | ||
UcontextMips64.h | ||
UcontextX86.h | ||
UcontextX86_64.h | ||
Unwinder.h | ||
UserArm.h | ||
UserArm64.h | ||
UserMips.h | ||
UserMips64.h | ||
UserX86.h | ||
UserX86_64.h |