From a7c66e7e5845b26711b261773179abf0f8b34ced Mon Sep 17 00:00:00 2001 From: Alex Light Date: Wed, 27 Jan 2021 11:41:58 -0800 Subject: 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 --- compiler/optimizing/nodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/optimizing/nodes.h') 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); -- cgit v1.2.3-59-g8ed1b