[libcxx] r346808 - Fix "use of" uninitialized memory in benchmark.

Eric Fiselier eric at efcs.ca
Tue Nov 13 15:00:56 PST 2018


Author: ericwf
Date: Tue Nov 13 15:00:55 2018
New Revision: 346808

URL: http://llvm.org/viewvc/llvm-project?rev=346808&view=rev
Log:
Fix "use of" uninitialized memory in benchmark.

An argument to DoNotOptimize was not fully initialized, which caused
msan to complain.

Modified:
    libcxx/trunk/benchmarks/function.bench.cpp

Modified: libcxx/trunk/benchmarks/function.bench.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/benchmarks/function.bench.cpp?rev=346808&r1=346807&r2=346808&view=diff
==============================================================================
--- libcxx/trunk/benchmarks/function.bench.cpp (original)
+++ libcxx/trunk/benchmarks/function.bench.cpp Tue Nov 13 15:00:55 2018
@@ -48,7 +48,7 @@ struct AllOpacity : EnumValuesAsTuple<Al
 
 struct S {
   int function() const { return 0; }
-  int field;
+  int field = 0;
 };
 
 int FunctionWithS(const S*) { return 0; }




More information about the libcxx-commits mailing list