[compiler-rt] c8f4e06 - [sanitizer] Fix test on arm 32bit

Yung, Douglas via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 00:22:12 PST 2020


Hi Vitaly,

Your fix to this test appears to have broken it on one of the build bots:

http://lab.llvm.org:8011/#/builders/112/builds/1127

Can you take a look?

Douglas Yung

-----Original Message-----
From: llvm-commits <llvm-commits-bounces at lists.llvm.org> On Behalf Of via llvm-commits
Sent: Saturday, November 14, 2020 0:03
To: llvm-commits at lists.llvm.org
Subject: [compiler-rt] c8f4e06 - [sanitizer] Fix test on arm 32bit


Author: Vitaly Buka
Date: 2020-11-14T00:02:29-08:00
New Revision: c8f4e06b29f4a91dc97f711901ebd575f840613a

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

LOG: [sanitizer] Fix test on arm 32bit

Make test values suitable for PC alignment arithmetic used in StackTrace::Print().

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cpp b/compiler-rt/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cpp
index aa0fd60ec1e3..28eb3f49d751 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cpp
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_stackdepot_test.c
+++ pp
@@ -72,17 +72,17 @@ TEST(SanitizerCommon, StackDepotSeveral) {  #define Maybe_StackDepotPrint StackDepotPrint  #endif  TEST(SanitizerCommon, Maybe_StackDepotPrint) {
-  uptr array1[] = {1, 2, 3, 4, 7};
+  uptr array1[] = {0x111, 0x222, 0x333, 0x444, 0x777};
   StackTrace s1(array1, ARRAY_SIZE(array1));
   u32 i1 = StackDepotPut(s1);
-  uptr array2[] = {1, 2, 3, 4, 8, 9};
+  uptr array2[] = {0x1111, 0x2222, 0x3333, 0x4444, 0x8888, 0x9999};
   StackTrace s2(array2, ARRAY_SIZE(array2));
   u32 i2 = StackDepotPut(s2);
   EXPECT_NE(i1, i2);
   EXPECT_EXIT(
       (StackDepotPrintAll(), exit(0)), ::testing::ExitedWithCode(0),
-      "Stack for id .*#0 0x0.*#1 0x1.*#2 0x2.*#3 0x3.*#4 0x6.*Stack for id "
-      ".*#0 0x0.*#1 0x1.*#2 0x2.*#3 0x3.*#4 0x7.*#5 0x8.*");
+      "Stack for id .*#0 0x1.*#1 0x2.*#2 0x3.*#3 0x4.*#4 0x7.*Stack for id "
+      ".*#0 0x1.*#1 0x2.*#2 0x3.*#3 0x4.*#4 0x8.*#5 0x9.*");
 }
 
 TEST(SanitizerCommon, StackDepotReverseMap) {


        
_______________________________________________
llvm-commits mailing list
llvm-commits at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list