Try to fix clang-cmake-aarch64-42vma by removing a memory leak (have a global var...
authorFilipe Cabecinhas <me@filcab.net>
Fri, 29 Apr 2016 21:33:12 +0000 (21:33 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Fri, 29 Apr 2016 21:33:12 +0000 (21:33 +0000)
llvm-svn: 268114

compiler-rt/test/asan/TestCases/invalid-pointer-pairs.cc

index 874107c..f3879d0 100644 (file)
@@ -8,11 +8,12 @@
 #include <assert.h>
 #include <stdlib.h>
 
+char *p;
 int main(int argc, char **argv) {
   // ALL-ERRORS: ERROR: AddressSanitizer: invalid-pointer-pair
   // [[PTR1:0x[0-9a-f]+]] [[PTR2:0x[0-9a-f]+]]
   assert(argc >= 2);
-  char *p = (char *)malloc(42);
+  p = (char *)malloc(42);
   char *q = (char *)malloc(42);
   switch (argv[1][0]) {
   case 'g':