platform_system_core/libunwindstack
Christopher Ferris 4ca98e18a4 Fix potential bad info in eh_frame_hdr.
Due to a bug, an elf can have FDEs with a length of zero, while still
having another FDE for the same pc with a non-zero length. The
eh_frame_hdr can sometimes point to the zero length FDE, but it should
have pointed to the non-zero length FDE. In order to fix this, if the
eh_frame_hdr points at the zero length FDE then try and find the real FDE
directly from eh_frame.

The change cleans up and removes unused variables from DwarfEhFrameWithHdr
and changes the objects so that all of the DwarfSection objects and
DwarfEhFrameWithHdr object inherit from the same class.

Add new unit tests to verify this functionality.

Bug: 142483624

Test: Unit tests all pass.
Change-Id: I128a916e3ba378931de7d44ee15e57e24d4073df
2019-10-29 18:39:30 -07:00
..
benchmarks Fix copy / move behaviour of Maps object. 2019-03-05 13:05:36 +00:00
include/unwindstack Fix potential bad info in eh_frame_hdr. 2019-10-29 18:39:30 -07:00
tests Fix potential bad info in eh_frame_hdr. 2019-10-29 18:39:30 -07:00
tools Fix handling of PT_GNU_EH_FRAME. 2019-10-21 19:11:22 -07:00
.clang-format Use the 2 space clang format for libunwindstack. 2017-03-21 10:41:45 -07:00
Android.bp Fix handling of PT_GNU_EH_FRAME. 2019-10-21 19:11:22 -07:00
AndroidVersions.md Add document of changes between Android versions. 2019-10-15 18:33:11 -07:00
ArmExidx.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ArmExidx.h Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
AsmGetRegsMips.S Add libunwindstack support for Mips and Mips64 2017-12-11 15:44:40 +01:00
AsmGetRegsMips64.S Add libunwindstack support for Mips and Mips64 2017-12-11 15:44:40 +01:00
AsmGetRegsX86.S Fix wrong mov instruction size. 2018-01-25 11:44:19 -08:00
AsmGetRegsX86_64.S Add full support for initing registers. 2017-07-11 12:15:54 -07:00
Check.h Add error propagation into Unwinder/Elf objects. 2018-01-24 17:50:46 -08:00
DexFile.cpp Continue without DEX support if libdexfile_external.so fails to load. 2019-10-08 19:21:45 +01:00
DexFile.h Revert "Check for data races when reading JIT/DEX entries." 2019-04-05 18:23:32 +00:00
DexFiles.cpp Revert "Check for data races when reading JIT/DEX entries." 2019-04-05 18:23:32 +00:00
DwarfCfa.cpp Move DwarfCfaInfo::kTable from data.rel.ro to rodata 2018-12-14 06:03:09 -08:00
DwarfCfa.h Move DwarfCfaInfo::kTable from data.rel.ro to rodata 2018-12-14 06:03:09 -08:00
DwarfDebugFrame.h Fix potential bad info in eh_frame_hdr. 2019-10-29 18:39:30 -07:00
DwarfEhFrame.h Fix potential bad info in eh_frame_hdr. 2019-10-29 18:39:30 -07:00
DwarfEhFrameWithHdr.cpp Fix potential bad info in eh_frame_hdr. 2019-10-29 18:39:30 -07:00
DwarfEhFrameWithHdr.h Fix potential bad info in eh_frame_hdr. 2019-10-29 18:39:30 -07:00
DwarfEncoding.h Make the library usable as a library. 2017-07-14 12:20:23 -07:00
DwarfMemory.cpp Handle when bias is different in elf headers. 2019-10-08 17:36:06 +00:00
DwarfOp.cpp libunwindstack: Move DwarfOp callback table to rodata section 2019-01-24 11:11:15 -08:00
DwarfOp.h libunwindstack: Move DwarfOp callback table to rodata section 2019-01-24 11:11:15 -08:00
DwarfSection.cpp Fix potential bad info in eh_frame_hdr. 2019-10-29 18:39:30 -07:00
Elf.cpp Handle when bias is different in elf headers. 2019-10-08 17:36:06 +00:00
ElfInterface.cpp Fix potential bad info in eh_frame_hdr. 2019-10-29 18:39:30 -07:00
ElfInterfaceArm.cpp Handle when bias is different in elf headers. 2019-10-08 17:36:06 +00:00
ElfInterfaceArm.h Handle when bias is different in elf headers. 2019-10-08 17:36:06 +00:00
Global.cpp Fix copy / move behaviour of Maps object. 2019-03-05 13:05:36 +00:00
JitDebug.cpp Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
LocalUnwinder.cpp Fix pc/function name for signal handler frame. 2019-04-12 17:23:18 -07:00
Log.cpp Make the library usable as a library. 2017-07-14 12:20:23 -07:00
MapInfo.cpp Handle when bias is different in elf headers. 2019-10-08 17:36:06 +00:00
Maps.cpp Fix LocalUpdatableMaps 2019-09-16 18:28:38 -07:00
Memory.cpp Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryBuffer.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryCache.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryFileAtOffset.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryLocal.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryOffline.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryOfflineBuffer.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryRange.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryRemote.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00
Regs.cpp Expose per arch headers. 2018-02-08 19:29:08 -08:00
RegsArm.cpp Add missing includes. 2018-12-06 10:09:20 -08:00
RegsArm64.cpp Add missing includes. 2018-12-06 10:09:20 -08:00
RegsInfo.h Fix off by one error. 2018-10-23 18:10:41 +01:00
RegsMips.cpp Fix usage of Read instead of ReadFully. 2019-01-15 19:10:49 -08:00
RegsMips64.cpp Add missing includes. 2018-12-06 10:09:20 -08:00
RegsX86.cpp libunwindstack: add Regs::Clone. 2018-04-20 13:23:20 -07:00
RegsX86_64.cpp Add missing includes. 2018-12-06 10:09:20 -08:00
Symbols.cpp Add missing includes. 2018-12-06 10:09:20 -08:00
Symbols.h Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
TEST_MAPPING Add test mapping to run the libunwind tests. 2019-09-03 13:32:51 -07:00
Unwinder.cpp Add test of undefined return address. 2019-08-30 23:29:34 -07:00