[compiler-rt] aba150c - [test][msan] Fix more tests for D134669

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 26 18:07:55 PDT 2022


Author: Vitaly Buka
Date: 2022-09-26T18:06:41-07:00
New Revision: aba150ca23640af792054f7e30c278a5613d72f2

URL: https://github.com/llvm/llvm-project/commit/aba150ca23640af792054f7e30c278a5613d72f2
DIFF: https://github.com/llvm/llvm-project/commit/aba150ca23640af792054f7e30c278a5613d72f2.diff

LOG: [test][msan] Fix more tests for D134669

Added: 
    

Modified: 
    compiler-rt/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cpp
    compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp
    compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cpp b/compiler-rt/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cpp
index 694e07f155d19..662625e16f3e1 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cpp
@@ -21,7 +21,7 @@ int foo() { return 1; }
 
 void Test(void *pc, const char *name) {
   char module_name[1024];
-  void *offset;
+  void *offset = 0;
   int ok = __sanitizer_get_module_and_offset_for_pc(
       pc, module_name, sizeof(module_name), &offset);
   if (!ok) {

diff  --git a/compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp b/compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp
index 239ed0d07bcc9..ca884cbc652e5 100644
--- a/compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp
+++ b/compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp
@@ -1,4 +1,4 @@
-// RUN: %clangxx -w -fsanitize=bool %s -o %t
+// RUN: %clangxx -w -fsanitize=bool -fno-sanitize-memory-param-retval %s -o %t
 // RUN: %run %t 2>&1 | FileCheck %s
 
 // __ubsan_on_report is not defined as weak. Redefining it here isn't supported

diff  --git a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
index 09eddff57aa1d..9e3514faa30bf 100644
--- a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
+++ b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clangxx -frtti -fsanitize=null,vptr -g %s -O3 -o %t -mllvm -enable-tail-merge=false
+// RUN: %clangxx -frtti -fsanitize=null,vptr -fno-sanitize-memory-param-retval -g %s -O3 -o %t -mllvm -enable-tail-merge=false
 // RUN: %env_ubsan_opts=halt_on_error=1 %run %t rT
 // RUN: %env_ubsan_opts=halt_on_error=1 %run %t mT
 // RUN: %env_ubsan_opts=halt_on_error=1 %run %t fT


        


More information about the llvm-commits mailing list