commit | 24bd89559c177af9e342f0d5a64a0a2855dfb887 | [log] [tgz] |
---|---|---|
author | Vladimir Marko <vmarko@google.com> | Tue Mar 15 10:40:33 2016 +0000 |
committer | Vladimir Marko <vmarko@google.com> | Tue Mar 15 10:43:13 2016 +0000 |
tree | eeacbc6d65b62dc018193b9440112ebbc4e3341e | |
parent | 51b7e2d08f2bcf528eeec48b42c178b5550f6635 [diff] [blame] |
Optimizing: Prevent potential valgrind error. This CL preemptively extends the workaround from https://android-review.googlesource.com/208230 to an almost identical bit of code. Bug: 27651442 Change-Id: I7683d42b46b16f2293916defc6ef1d871dc9af6c
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc index 8daa46c..09f841c 100644 --- a/compiler/optimizing/instruction_simplifier.cc +++ b/compiler/optimizing/instruction_simplifier.cc
@@ -513,7 +513,9 @@ return; } - bool outcome; + // Note: The `outcome` is initialized to please valgrind - the compiler can reorder + // the return value check with the `outcome` check, b/27651442 . + bool outcome = false; if (TypeCheckHasKnownOutcome(load_class, object, &outcome)) { if (outcome && can_be_null) { // Type test will succeed, we just need a null test.