platform_system_core/libunwindstack/tests
Christopher Ferris 56d0e07d70 Fix which maps to search for globals.
If multiple threads are unwinding at the same time, new maps that contain
the global variables for dex files and jit information are created. This
leads to threads creating more new maps that then get searched, then
more maps, then more searching until virtual address space exhaustion.

Fix this so that we only search maps that have a corresponding rw map that
could contain the global memory.

Small refactor to combine the code to search for global variables into
one class that both classes inherit from.

Modify unit tests for the new pattern checking.

Bug: 117761427

Test: Ran unit tests for libunwindstack/libbacktrace/simpleperf.
Test: Ran art 004-ThreadStress that used to fail.
Change-Id: I837ca6b9d0383100079de090bc7d019598e0cdfe
2018-10-17 14:23:10 -07:00
..
files Fix which maps to search for globals. 2018-10-17 14:23:10 -07:00
ArmExidxDecodeTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ArmExidxExtractTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
DexFileData.h Load dex files from ART-specific data structure. 2018-02-02 15:03:00 -08:00
DexFileTest.cpp Implement support for linker rosegment option. 2018-10-03 20:48:45 -07:00
DexFilesTest.cpp Fix which maps to search for globals. 2018-10-17 14:23:10 -07:00
DwarfCfaLogTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
DwarfCfaTest.cpp Don't implicitly dereference DW_CFA_def_cfa_expression. 2018-03-08 14:44:11 -08:00
DwarfDebugFrameTest.cpp Refactor the DwarfSection classes. 2018-06-27 14:52:21 -07:00
DwarfEhFrameTest.cpp Refactor the DwarfSection classes. 2018-06-27 14:52:21 -07:00
DwarfEhFrameWithHdrTest.cpp Refactor the DwarfSection classes. 2018-06-27 14:52:21 -07:00
DwarfMemoryTest.cpp Fix another set of bugs. 2017-08-10 17:37:32 -07:00
DwarfOpLogTest.cpp Add error propagation into Unwinder/Elf objects. 2018-01-24 17:50:46 -08:00
DwarfOpTest.cpp Always set the sp reg to the cfa for DWARF. 2018-03-16 23:38:07 -07:00
DwarfSectionImplTest.cpp Refactor the DwarfSection classes. 2018-06-27 14:52:21 -07:00
DwarfSectionTest.cpp Refactor the DwarfSection classes. 2018-06-27 14:52:21 -07:00
ElfCacheTest.cpp Implement support for linker rosegment option. 2018-10-03 20:48:45 -07:00
ElfFake.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ElfFake.h Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ElfInterfaceArmTest.cpp Remove Memory::ReadField. 2018-07-12 12:45:31 -07:00
ElfInterfaceTest.cpp Be permissive about badly formed elf files. 2018-08-03 22:02:05 +00:00
ElfTest.cpp Implement support for linker rosegment option. 2018-10-03 20:48:45 -07:00
ElfTestUtils.cpp Fix incorrect usage of relative pcs. 2017-11-29 16:10:08 -08:00
ElfTestUtils.h Fix incorrect usage of relative pcs. 2017-11-29 16:10:08 -08:00
GenGnuDebugdata.cpp Add .gnu_debugdata support. 2017-06-28 15:23:10 -07:00
JitDebugTest.cpp Fix which maps to search for globals. 2018-10-17 14:23:10 -07:00
LocalUnwinderTest.cpp Add a specialized LocalUnwinder object. 2018-05-23 20:02:30 -07:00
LogFake.cpp Make the library usable as a library. 2017-07-14 12:20:23 -07:00
LogFake.h Make the library usable as a library. 2017-07-14 12:20:23 -07:00
MapInfoCreateMemoryTest.cpp Implement support for linker rosegment option. 2018-10-03 20:48:45 -07:00
MapInfoGetElfTest.cpp Implement support for linker rosegment option. 2018-10-03 20:48:45 -07:00
MapInfoGetLoadBiasTest.cpp Implement support for linker rosegment option. 2018-10-03 20:48:45 -07:00
MapsTest.cpp Implement support for linker rosegment option. 2018-10-03 20:48:45 -07:00
MemoryBufferTest.cpp unwindstack: rename Memory::ReadPartially to Read. 2017-11-15 15:38:13 -08:00
MemoryFake.cpp Implement support for linker rosegment option. 2018-10-03 20:48:45 -07:00
MemoryFake.h Implement support for linker rosegment option. 2018-10-03 20:48:45 -07:00
MemoryFileTest.cpp unwindstack: rename Memory::Read to ReadFully. 2017-11-15 15:38:13 -08:00
MemoryLocalTest.cpp unwindstack: rename Memory::ReadPartially to Read. 2017-11-15 15:38:13 -08:00
MemoryOfflineBufferTest.cpp Add a MemoryOfflineBuffer object. 2018-04-03 18:37:52 -07:00
MemoryOfflineTest.cpp unwindstack: add some perfunctory MemoryOffline tests. 2017-12-15 14:11:12 -08:00
MemoryRangeTest.cpp Implement support for linker rosegment option. 2018-10-03 20:48:45 -07:00
MemoryRangesTest.cpp Implement support for linker rosegment option. 2018-10-03 20:48:45 -07:00
MemoryRemoteTest.cpp Add tool to save information from a process. 2017-12-20 12:57:01 -08:00
MemoryTest.cpp Remove Memory::ReadField. 2018-07-12 12:45:31 -07:00
RegsFake.h libunwindstack: add Regs::Clone. 2018-04-20 13:23:20 -07:00
RegsInfoTest.cpp Fix incorrect left shifts. 2018-08-02 18:01:02 -07:00
RegsIterateTest.cpp Expose per arch headers. 2018-02-08 19:29:08 -08:00
RegsStepIfSignalHandlerTest.cpp Always set the sp reg to the cfa for DWARF. 2018-03-16 23:38:07 -07:00
RegsTest.cpp Implement support for linker rosegment option. 2018-10-03 20:48:45 -07:00
SymbolsTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
TestLocal.cpp Add a specialized LocalUnwinder object. 2018-05-23 20:02:30 -07:00
TestUtils.h Fix UnwindTest repeatability. 2017-09-06 17:08:44 -07:00
UnwindOfflineTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
UnwindTest.cpp Move libbacktrace off cutils. 2018-07-11 13:55:07 -07:00
UnwinderTest.cpp Fix problem adding too many frames. 2018-10-12 16:36:35 -07:00