summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2021-01-27 11:41:58 -0800
committer Alex Light <allight@google.com> 2021-01-28 21:23:25 +0000
commita7c66e7e5845b26711b261773179abf0f8b34ced (patch)
treea621a91059f9a7d2cefc92710fac2cd28350d133 /compiler/optimizing/nodes.h
parentaf2aabc47d97556bf0fde258e6ddb472eebe0855 (diff)
Avoid potential null dereference
In a log statement we were dereferencing a pointer that could potentially be null. Add support for safely dereferencing a pointer for ostreams. Test: ./test.py --host Bug: 67037140 Change-Id: Ibe04811883575902a9b2fe8a064f18de2b2cea7b
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 9e0f515ba9..6381b2c356 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -8256,7 +8256,7 @@ class HParallelMove final : public HExpression<0> {
DCHECK(!destination.OverlapsWith(move.GetDestination()))
<< "Overlapped destination for two moves in a parallel move: "
<< move.GetSource() << " ==> " << move.GetDestination() << " and "
- << source << " ==> " << destination << " for " << *instruction;
+ << source << " ==> " << destination << " for " << SafePrint(instruction);
}
}
moves_.emplace_back(source, destination, type, instruction);