summaryrefslogtreecommitdiff
path: root/compiler/optimizing/codegen_test.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2018-08-07 09:55:57 +0100
committerNicolas Geoffray <ngeoffray@google.com>2018-08-20 17:18:31 +0100
commit61ba8d2421a98e9b16510be4f9af7ca7bc4c9055 (patch)
tree9a79331dd5ebd46ed46f853b24ab072f43debf28 /compiler/optimizing/codegen_test.cc
parenteb369ce3669be74dd89b21f8b3ab31ace4a47086 (diff)
Fix longstanding bug around implicit NPEs and GC, version 2.
The TODO has been there since M (so forever :)): https://android-review.googlesource.com/c/platform/art/+/122794/13//COMMIT_MSG#13 We hardly see the issue in our tests as we need to have: 1) A GC happening while creating the NPE object. 2) ParallelMoves between the NullCheck and implicit null check operation that moves references. The CL piggy backs on the "IsEmittedAtUseSite" flag, to set implicit null checks with it. The liveness analysis then special cases implicit null checks to record environment uses at the location of the actual instruction that will do the implicit null check. Test: test.py --gcstress Test: run-libcore-tests --gcstress bug: 111545159 Change-Id: I3ecea4fe0d7e483e93db83281ca10db47da228c5
Diffstat (limited to 'compiler/optimizing/codegen_test.cc')
-rw-r--r--compiler/optimizing/codegen_test.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/codegen_test.cc b/compiler/optimizing/codegen_test.cc
index 86687e60a9..f186191a0f 100644
--- a/compiler/optimizing/codegen_test.cc
+++ b/compiler/optimizing/codegen_test.cc
@@ -453,7 +453,7 @@ TEST_F(CodegenTest, NonMaterializedCondition) {
ASSERT_FALSE(equal->IsEmittedAtUseSite());
graph->BuildDominatorTree();
- PrepareForRegisterAllocation(graph).Run();
+ PrepareForRegisterAllocation(graph, *compiler_options_).Run();
ASSERT_TRUE(equal->IsEmittedAtUseSite());
auto hook_before_codegen = [](HGraph* graph_in) {