summaryrefslogtreecommitdiffstats
path: root/libunwindstack/DexFiles.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Check for data races when reading JIT/DEX entries."David Srbecky2019-04-121-0/+179
| | | | | | | | | | | | This reverts commit 85b5fecec920208ec43b42488f08d4c2e5aaeda2. Reason for revert: Breaks ART tests, reverting to investigate. Exempt-From-Owner-Approval: Revert. (cherry picked from commit b9cc4fbb268652744c812415cb2e5d1fbe04879a) Bug: 130406806 Change-Id: I634e37060b97484d627fc544e3b406fd90aaa784
* Check for data races when reading JIT/DEX entries.David Srbecky2019-03-291-179/+0
| | | | | | | | | | | Update the entries only when the list is modified by the runtime. Check that the list wasn't concurrently modified when being read. Bug: 124287208 Test: libunwindstack_test Test: art/test.py -b --host -r -t 137-cfi Change-Id: I87ba70322053a01b3d5be1fdf6310e1dc21bb084
* Revert^2 "Use libdexfile external API in libunwindstack."Martin Stjernholm2018-12-191-8/+5
| | | | | | | | | | | | | | | | This reverts commit cacf5bf6bca7e9806739a27589d8b6101c567c32. Reason for revert: Re-apply with proper fix for VNDK visibility on marlin and sailfish. Test: Manual repro of http://b/121110092#comment1 on reported branch Test: atest CtsRenderscriptTestCases Test: mmma system/core/{libunwindstack,libbacktrace}, run host gtests Test: Make image, flash, and reboot device. Test: Forrest cts/art/gce-all: https://android-build.googleplex.com/builds/forrest/run/L00300000240828791 Test: Forrest cts/bionic/gce-all: https://android-build.googleplex.com/builds/forrest/run/L05600000240682947 (shows 27/2958 failed, but it doesn't pass on Blackbox either: http://screen/xbjioEf6UgR) Test: Forrest cts/renderscript/gce-all: https://android-build.googleplex.com/builds/forrest/run/L66200000240680523 Bug: 119632407 Change-Id: I601aa97eac8127e30d753405f8bc1fc4ae7f849f
* Revert "Use libdexfile external API in libunwindstack."Martin Stjernholm2018-12-191-5/+8
| | | | | | | | | | | | | | | This reverts commit 444e23d2fc6d7c6f799ff9e2f69c1a82d2960c5b. The rest of the topic doesn't need to be reverted. Reason for revert: Breaks renderscript on marlin and sailfish. Test: Manual repro of http://b/121110092#comment1 on reported branch Test: "atest CtsRenderscriptTestCases" on that branch Test: mmma system/core/{libunwindstack,libbacktrace}, run host gtests Test: Make image, flash, and reboot device. Bug: 121110092, 119632407 Change-Id: If1976b19ce386c95bc5bd4fd6d523745c167de18
* Use libdexfile external API in libunwindstack.Martin Stjernholm2018-12-131-8/+5
| | | | | | | Test: mmma system/core/{libunwindstack,libbacktrace}, run host gtests Test: Make image, flash, and reboot device. Bug: 119632407 Change-Id: I370f089a1b20ba432e136818b4325d46f99df708
* Verify that the elf matches the expected arch.Christopher Ferris2018-10-291-2/+2
| | | | | | | | | To avoid a case where a malicious app might try and trick the system to create an elf and register object that mismatches, always verify that they are the same arch. Test: Ran unit tests. Change-Id: I66978e9e02f8e4f396856912e7019528ead4838e
* Fix which maps to search for globals.Christopher Ferris2018-10-171-32/+8
| | | | | | | | | | | | | | | | | | | | | 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
* Fix handling of globals for new linker.Christopher Ferris2018-10-081-1/+1
| | | | | | | | | | | | | The new linker base map is read-only, but the global handling code for jit and dex information assumed the base map was a read-execute one. Relax that requirement to search read-only maps. Adjust the unit tests for this case. Bug: 117293117 Test: Passes unit tests. Test: Passes art cfi tests with and without llvm linker. Change-Id: I31a765d51847d0b8d778ace9cbaa29f42073f4d9
* Adjust DEX file reading to follow layout changes in ART.David Srbecky2018-02-161-3/+5
| | | | | | | | | | I have changed the root DEX debug descriptor in ART to more closely follow the JIT debug descriptor. Add the appropriate offsets to correctly fetch the linked list head for DEX files. Test: testrunner.py -t 137 Test: libunwindstack_test Change-Id: I90402befc88fec42658f7330d51ee79756a7f872
* Load dex files from ART-specific data structure.Christopher Ferris2018-02-021-7/+146
| | | | | | | | | | | | | Fixes cdex which was recently changed to have shared data section, which means the DEX PC cannot be used to find the right symbol, as the bytecode is no longer within the dex file, and in-fact, we might have to scan multiple dex files to find the method. Bug: 72520014 Test: testrunner.py --host --cdex-none -t 137 Test: testrunner.py --host --cdex-fast -t 137 Test: All unit tests pass. Change-Id: I80265d05ad69dd9cefbe3f8a75e4cd349002af5e
* Fix symbol resolution within a dex file.David Srbecky2018-02-011-3/+3
| | | | | | | Fixes the ART 137-cfi test, currently failing on buildbot. Test: testrunner.py -j40 --host --cdex-none -t 137 -b Change-Id: I16a007b291702207bbd003fd1e78e8e5ced7cd68
* Move dex pc frame creation into libunwindstack.Christopher Ferris2018-01-311-0/+65
Test: Compiles, all unit tests pass. Test: Ran 137-cfi art test in interpreter and verified interpreter Test: frames still show up. Change-Id: Icea90194986faa733a873e8cf467fc2513eb5573