diff options
author | 2020-03-10 14:30:49 +0000 | |
---|---|---|
committer | 2020-03-10 17:08:03 +0000 | |
commit | b1fe5e18318c3af8d0cedc3f19cb6bc51817b859 (patch) | |
tree | 4d88d27299206410ab0908baa9f7d0be14075790 /compiler/optimizing/nodes.h | |
parent | 69828ac1c6de77fadb3660d6f20b52d46440a0a9 (diff) |
HStringBuilderAppend cannot be null.
Fix DCHECK() failure where we replaced an instruction
with non-null result (HInvoke StringBuilder.toString())
with an instruction that did not report that the result
cannot be null (HStringBuilderAppend) and then used the
result as both receiver and argument for String.equals().
The fix is to preserve the "cannot be null" invariant.
Test: Additional test in 697-checker-string-append.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 151107293
Bug: 19575890
Change-Id: I205f002bf8d2dfee6079ea0e14786ca0ab2e2e9c
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r-- | compiler/optimizing/nodes.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index eece2e4b08..7ed5bca947 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -6948,6 +6948,8 @@ class HStringBuilderAppend final : public HVariableInputSizeInstruction { bool CanThrow() const override { return true; } + bool CanBeNull() const override { return false; } + DECLARE_INSTRUCTION(StringBuilderAppend); protected: |