• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang -g -fsanitize=address -O2 %s -o %t
2 // RUN: ASAN_OPTIONS="strip_path_prefix='/'" %t 2>&1 | FileCheck %s
3 
4 #include <stdlib.h>
main()5 int main() {
6   char *x = (char*)malloc(10 * sizeof(char));
7   free(x);
8   return x[5];
9   // Check that paths in error report don't start with slash.
10   // CHECK: heap-use-after-free
11   // CHECK-NOT: #0 0x{{.*}} ({{[/].*}})
12 }
13