llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-compiler-rt-sanitizer Author: None (llvmbot) <details> <summary>Changes</summary> Backport fcdcc4ea7ac960c79246b3bd428f14ea350e63e2 Requested by: @<!-- -->mgorny --- Full diff: https://github.com/llvm/llvm-project/pull/151201.diff 1 Files Affected: - (modified) compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp (+2-1) ``````````diff diff --git a/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp b/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp index 05065444a70c5..612317b3c3293 100644 --- a/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp +++ b/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp @@ -183,7 +183,8 @@ TEST_F(ScudoWrappersCDeathTest, Malloc) { // process doing free(P) is not a double free. EXPECT_DEATH( { - void *Ptr = malloc(Size); + // Note: volatile here prevents the calls from being optimized out. + void *volatile Ptr = malloc(Size); free(Ptr); free(Ptr); }, `````````` </details> https://github.com/llvm/llvm-project/pull/151201 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits