[llvm-branch-commits] [llvm-branch] r367818 - Merging r367662:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 5 02:02:29 PDT 2019


Author: hans
Date: Mon Aug  5 02:02:29 2019
New Revision: 367818

URL: http://llvm.org/viewvc/llvm-project?rev=367818&view=rev
Log:
Merging r367662:
------------------------------------------------------------------------
r367662 | psmith | 2019-08-02 10:05:14 +0200 (Fri, 02 Aug 2019) | 17 lines

[AliasAnalysis] Initialize a member variable that may be used by unit test.

The unit tests in BasicAliasAnalysisTest use the alias analysis API
directly and do not call setAAResults to initalize AAR. This gives a
valgrind error "Conditional Jump depends on unitialized variable".

On most buildbots the variable is nullptr, but in some cases it can be
non nullptr leading to seemingly random failures.

These tests were disabled in r366986. With the initialization they can be
enabled again.

Fixes PR42719

Differential Revision: https://reviews.llvm.org/D65568


------------------------------------------------------------------------

Modified:
    llvm/branches/release_90/   (props changed)
    llvm/branches/release_90/include/llvm/Analysis/AliasAnalysis.h

Propchange: llvm/branches/release_90/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug  5 02:02:29 2019
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,366431,366481,366487,366527,366570,366868,366925,367030,367062,367124,367215,367292,367304,367314,367340-367341,367394,367396,367398,367417,367753
+/llvm/trunk:155241,366431,366481,366487,366527,366570,366868,366925,367030,367062,367124,367215,367292,367304,367314,367340-367341,367394,367396,367398,367417,367662,367753

Modified: llvm/branches/release_90/include/llvm/Analysis/AliasAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/include/llvm/Analysis/AliasAnalysis.h?rev=367818&r1=367817&r2=367818&view=diff
==============================================================================
--- llvm/branches/release_90/include/llvm/Analysis/AliasAnalysis.h (original)
+++ llvm/branches/release_90/include/llvm/Analysis/AliasAnalysis.h Mon Aug  5 02:02:29 2019
@@ -949,7 +949,7 @@ template <typename DerivedT> class AARes
 
   /// A pointer to the AAResults object that this AAResult is
   /// aggregated within. May be null if not aggregated.
-  AAResults *AAR;
+  AAResults *AAR = nullptr;
 
   /// Helper to dispatch calls back through the derived type.
   DerivedT &derived() { return static_cast<DerivedT &>(*this); }




More information about the llvm-branch-commits mailing list