summaryrefslogtreecommitdiff
path: root/test/utils/python/generate_java_main.py
diff options
context:
space:
mode:
authorbuzbee <buzbee@google.com>2016-06-23 13:35:39 -0700
committerbuzbee <buzbee@google.com>2016-07-06 09:10:34 -0700
commite664cfef4d373a037dcf18637bea6b41e0624302 (patch)
treede257eb9ada3b80c525b677f6e6dcd8640a0c4cb /test/utils/python/generate_java_main.py
parent2150d94b5a399dd7d52e1309da2e3bf80d1a5517 (diff)
ART: Add Mterp export pc poison testing mode
One of the optimizations of the Mterp assembly interpreter is that it attempts to limit the number of times it updates the saved dex_pc_ value stored in the shadow frame. Instead, it maintains a pointer to the current dex instruction in a dedicated register. However, whenever execution flow exits the immediate mterp environment and some other part of the runtime needs to know the current dex pc (for example - exception throws), mterp must save - or "export" the dex_pc back into it's home location in the shadow frame. Forgetting to do this is a typical bug when developing mterp instruction handlers. And, the failures show up in odd and sometimes hard to track down ways. This CL adds a testing mode that poisons the saved dex_pc prior to each instruction interpretation. Thus, if any individual handler neglects to properly export the current dex pc and then goes on to use it we'll segfault out with an identifiable fault address: 0xdead00ff. TEST: test-art-target (Nexus 5x, Nexus 6p), test-art-host. Verified expected failure by artificially neglecting an EXPORT_PC. Bug: 26572899 Change-Id: I704fbb8ece693b94341aed0ffbb51a6acfb89697
Diffstat (limited to 'test/utils/python/generate_java_main.py')
0 files changed, 0 insertions, 0 deletions