Home | History | Annotate | Download | only in output_tests
      1 __attribute__((noinline))
      2 static void NullDeref(int *ptr) {
      3   ptr[10]++;
      4 }
      5 int main() {
      6   NullDeref((int*)0);
      7 }
      8 
      9 // Check-Common: {{.*ERROR: AddressSanitizer crashed on unknown address}}
     10 // Check-Common:   {{0x0*00028 .*pc 0x.*}}
     11 // Check-Common: {{AddressSanitizer can not provide additional info. ABORTING}}
     12 
     13 // atos on Mac cannot resolve the file:line info for frame 0 on the O1 level
     14 // Check-Linux: {{    #0 0x.* in NullDeref.*null_deref.cc:3}}
     15 // Check-Darwin: {{    #0 0x.* in NullDeref.*}}
     16 
     17 // Check-Common: {{    #1 0x.* in main.*null_deref.cc:[67]}}
     18