android_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
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
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
ArmExidx.h
AsmGetRegsMips.S
AsmGetRegsMips64.S
AsmGetRegsX86.S
AsmGetRegsX86_64.S
Check.h
DexFile.cpp Continue without DEX support if libdexfile_external.so fails to load. 2019-10-08 19:21:45 +01:00
DexFile.h
DexFiles.cpp
DwarfCfa.cpp
DwarfCfa.h
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
DwarfMemory.cpp Handle when bias is different in elf headers. 2019-10-08 17:36:06 +00:00
DwarfOp.cpp
DwarfOp.h
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
JitDebug.cpp
LocalUnwinder.cpp
Log.cpp
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
MemoryBuffer.h
MemoryCache.h
MemoryFileAtOffset.h
MemoryLocal.h
MemoryOffline.h
MemoryOfflineBuffer.h
MemoryRange.h
MemoryRemote.h
OWNERS
Regs.cpp
RegsArm.cpp
RegsArm64.cpp
RegsInfo.h
RegsMips.cpp
RegsMips64.cpp
RegsX86.cpp
RegsX86_64.cpp
Symbols.cpp
Symbols.h
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