diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2017-08-16 07:22:49 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2017-08-16 07:22:49 +0000 |
commit | bacb80d0d9fb9e11f6eefc0ca12648c29ca688a3 (patch) | |
tree | 2dac82ef7ba8fdc73d0abff4c2e0c69bf55e66d5 /clang/lib/AST/ExprConstant.cpp | |
parent | 92f32d0c5359e23036ba609e44208d2a4bf038e4 (diff) | |
download | llvm-bacb80d0d9fb9e11f6eefc0ca12648c29ca688a3.zip llvm-bacb80d0d9fb9e11f6eefc0ca12648c29ca688a3.tar.gz llvm-bacb80d0d9fb9e11f6eefc0ca12648c29ca688a3.tar.bz2 |
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
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 94b6e08..32cb42e 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; |