android_system_core/libunwindstack/tests
Christopher Ferris 8726d3a448 Fix handling of possible bad gnu_debugdata_size.
Rather than use a std::vector for backing memory, allocate the memory
using a new with nothrow, and in MemoryBuffer use realloc. Since
the size field is coming from the elf, it could be corrupted or
intentionally crafted to cause problems.

In addition, add some other protections to make sure that overflows
don't occur.

Bug: 146215949

Test: Ran unit tests with jemalloc and scudo to verify that they
Test: both behave the same way.
Change-Id: If14243ce382ba5403a6bacd0ec673452c6b7c3be
2019-12-19 16:48:15 -08:00
..
files Use elf offset in signal step check. 2019-12-04 22:29:59 +00:00
ArmExidxDecodeTest.cpp Fix build with new googletest 2019-11-10 04:08:25 +00:00
ArmExidxExtractTest.cpp
DexFileData.h
DexFileTest.cpp
DexFilesTest.cpp Fix support finding global variables. 2019-12-03 17:35:00 -08:00
DwarfCfaLogTest.cpp Add a name for all test suites 2019-12-11 12:46:20 -08:00
DwarfCfaTest.cpp Add a name for all test suites 2019-12-11 12:46:20 -08:00
DwarfDebugFrameTest.cpp Add a name for all test suites 2019-12-11 12:46:20 -08:00
DwarfEhFrameTest.cpp Add a name for all test suites 2019-12-11 12:46:20 -08:00
DwarfEhFrameWithHdrTest.cpp Add a name for all test suites 2019-12-11 12:46:20 -08:00
DwarfMemoryTest.cpp
DwarfOpLogTest.cpp Add a name for all test suites 2019-12-11 12:46:20 -08:00
DwarfOpTest.cpp Add a name for all test suites 2019-12-11 12:46:20 -08:00
DwarfSectionImplTest.cpp Add a name for all test suites 2019-12-11 12:46:20 -08:00
DwarfSectionTest.cpp Replace MOCK_METHODN with MOCK_METHOD macro. 2019-10-11 14:30:18 -07:00
ElfCacheTest.cpp
ElfFake.cpp
ElfFake.h Fix handling of possible bad gnu_debugdata_size. 2019-12-19 16:48:15 -08:00
ElfInterfaceArmTest.cpp
ElfInterfaceTest.cpp Fix handling of possible bad gnu_debugdata_size. 2019-12-19 16:48:15 -08:00
ElfTest.cpp Use elf offset in signal step check. 2019-12-04 22:29:59 +00:00
ElfTestUtils.cpp
ElfTestUtils.h
GenGnuDebugdata.cpp
IsolatedSettings.cpp
JitDebugTest.cpp Fix support finding global variables. 2019-12-03 17:35:00 -08:00
LocalUnwinderTest.cpp
LocalUpdatableMapsTest.cpp
LogFake.cpp
LogFake.h
MapInfoCreateMemoryTest.cpp
MapInfoGetBuildIDTest.cpp
MapInfoGetElfTest.cpp
MapInfoGetLoadBiasTest.cpp
MapInfoTest.cpp
MapsTest.cpp
MemoryBufferTest.cpp
MemoryCacheTest.cpp
MemoryFake.cpp
MemoryFake.h
MemoryFileTest.cpp
MemoryLocalTest.cpp
MemoryOfflineBufferTest.cpp
MemoryOfflineTest.cpp
MemoryRangeTest.cpp
MemoryRangesTest.cpp
MemoryRemoteTest.cpp
MemoryTest.cpp
RegsFake.h
RegsInfoTest.cpp
RegsIterateTest.cpp Merge "Include PSTATE in tombstones on arm64." 2019-11-19 14:07:37 +00:00
RegsStepIfSignalHandlerTest.cpp
RegsTest.cpp
SymbolsTest.cpp Add a name for all test suites 2019-12-11 12:46:20 -08:00
TestLocal.cpp
TestUtils.cpp
TestUtils.h
UnwindOfflineTest.cpp Use elf offset in signal step check. 2019-12-04 22:29:59 +00:00
UnwindTest.cpp
UnwinderTest.cpp
VerifyBionicTerminationTest.cpp