platform_system_core/libunwindstack
Christopher Ferris 6dbc28ece3 Fix null pointer dereference in RegsArm.
Fix RegsArm::GetPcAdjustment to check for an invalid elf before trying
to read memory.
Modify the tests for this so it crashes without this change.

Also modify the GetPcAdjustment for all different architectures so
that unless the relative pc is too small, it will return the minimum
amount that should be adjusted. This is to handle cases where we still
want to adjust the pc but it's in an invalid elf. Mostly this is for
handling cases when the pc is in jit gdb debug code so that we use the
right unwind information.

Bug: 77233204

Test: Passes unit tests for libbacktrace/libunwindstack.
Change-Id: Id73609adaf3b80a583584441de228156fec3afa7
2018-03-28 17:21:01 -07:00
..
include/unwindstack Support a map that represents gdb jit elf data. 2018-03-21 17:23:54 -07:00
tests Fix null pointer dereference in RegsArm. 2018-03-28 17:21:01 -07:00
tools Handle ARM thumb function symbols. 2018-03-15 15:14:18 -07:00
.clang-format Use the 2 space clang format for libunwindstack. 2017-03-21 10:41:45 -07:00
Android.bp Support a map that represents gdb jit elf data. 2018-03-21 17:23:54 -07:00
ArmExidx.cpp Expose per arch headers. 2018-02-08 19:29:08 -08:00
ArmExidx.h Add error propagation into Unwinder/Elf objects. 2018-01-24 17:50:46 -08: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 Remove dependency on -no_art variant 2018-02-07 15:19:22 -08:00
DexFile.h Load dex files from ART-specific data structure. 2018-02-02 15:03:00 -08:00
DexFiles.cpp Adjust DEX file reading to follow layout changes in ART. 2018-02-16 14:54:49 +00:00
DwarfCfa.cpp Don't implicitly dereference DW_CFA_def_cfa_expression. 2018-03-08 14:44:11 -08:00
DwarfCfa.h Add error propagation into Unwinder/Elf objects. 2018-01-24 17:50:46 -08:00
DwarfDebugFrame.h Add support for only a .eh_frame. 2017-11-07 13:22:39 -08:00
DwarfEhFrame.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
DwarfEhFrameWithHdr.cpp Fix off by 4 error handling eh_frame hdr. 2018-02-10 17:11:23 -08:00
DwarfEhFrameWithHdr.h Add support for only a .eh_frame. 2017-11-07 13:22:39 -08:00
DwarfEncoding.h Make the library usable as a library. 2017-07-14 12:20:23 -07:00
DwarfMemory.cpp unwindstack: rename Memory::Read to ReadFully. 2017-11-15 15:38:13 -08:00
DwarfOp.cpp Implement new DEX PC lookup scheme. 2018-02-13 16:45:38 -08:00
DwarfOp.h Implement new DEX PC lookup scheme. 2018-02-13 16:45:38 -08:00
DwarfSection.cpp Always set the sp reg to the cfa for DWARF. 2018-03-16 23:38:07 -07:00
Elf.cpp Modify elf cache to handle elf_offsets properly. 2018-02-16 14:52:38 -08:00
ElfInterface.cpp Fix soname reading code. 2018-02-15 17:57:13 -08:00
ElfInterfaceArm.cpp Always set the sp reg to the cfa for DWARF. 2018-03-16 23:38:07 -07:00
ElfInterfaceArm.h Handle ARM thumb function symbols. 2018-03-15 15:14:18 -07:00
JitDebug.cpp Load dex files from ART-specific data structure. 2018-02-02 15:03:00 -08:00
Log.cpp Make the library usable as a library. 2017-07-14 12:20:23 -07:00
MapInfo.cpp Modify elf cache to handle elf_offsets properly. 2018-02-16 14:52:38 -08:00
Maps.cpp Support a map that represents gdb jit elf data. 2018-03-21 17:23:54 -07:00
Memory.cpp Add ability to read jit gdb data. 2018-01-12 11:18:42 -08: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 Fix null pointer dereference in RegsArm. 2018-03-28 17:21:01 -07:00
RegsArm64.cpp Fix null pointer dereference in RegsArm. 2018-03-28 17:21:01 -07:00
RegsInfo.h Implement new DEX PC lookup scheme. 2018-02-13 16:45:38 -08:00
RegsMips.cpp Fix null pointer dereference in RegsArm. 2018-03-28 17:21:01 -07:00
RegsMips64.cpp Fix null pointer dereference in RegsArm. 2018-03-28 17:21:01 -07:00
RegsX86.cpp Fix null pointer dereference in RegsArm. 2018-03-28 17:21:01 -07:00
RegsX86_64.cpp Fix null pointer dereference in RegsArm. 2018-03-28 17:21:01 -07:00
Symbols.cpp Add ability to read jit gdb data. 2018-01-12 11:18:42 -08:00
Symbols.h Add ability to read jit gdb data. 2018-01-12 11:18:42 -08:00
Unwinder.cpp Support a map that represents gdb jit elf data. 2018-03-21 17:23:54 -07:00