From bacb80d0d9fb9e11f6eefc0ca12648c29ca688a3 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Wed, 16 Aug 2017 07:22:49 +0000 Subject: Fix a UBSan failure where this boolean was copied when uninitialized. When r310905 moved the pointer and bool out of a PointerIntPair, it made them end up uninitialized and caused UBSan failures when copying the uninitialized boolean. However, making the pointer be null should avoid the reference to the boolean entirely. llvm-svn: 310994 --- clang/lib/AST/ExprConstant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang') diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 94b6e082d81..32cb42ea4e0 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -977,7 +977,7 @@ namespace { /// RAII object used to optionally suppress diagnostics and side-effects from /// a speculative evaluation. class SpeculativeEvaluationRAII { - EvalInfo *Info; + EvalInfo *Info = nullptr; Expr::EvalStatus OldStatus; bool OldIsSpeculativelyEvaluating; -- cgit v1.2.3