From 3ab118a57d3803f45e3fe95321654994f2c9e1a1 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 18 Sep 2020 16:46:20 -0700 Subject: [PATCH] [NFC][Asan] Fix test broken by RegAllocFast The test worked only because by coincidence register with pointer was clobbered. After D52010 value is still preserved. --- compiler-rt/test/asan/TestCases/Linux/leak.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler-rt/test/asan/TestCases/Linux/leak.cpp b/compiler-rt/test/asan/TestCases/Linux/leak.cpp index e22cd6e..a4ee99b 100644 --- a/compiler-rt/test/asan/TestCases/Linux/leak.cpp +++ b/compiler-rt/test/asan/TestCases/Linux/leak.cpp @@ -9,8 +9,7 @@ int *t; int main(int argc, char **argv) { - t = new int[argc - 1]; + t = new int[argc - 1] - 100000; printf("t: %p\n", t); - t = 0; } // CHECK: LeakSanitizer: detected memory leaks -- 2.7.4