1RUN: %cpp_compiler %S/NullDerefTest.cpp -o %t-NullDerefTest
2RUN: %env_asan_opts=handle_segv=0 not %run %t-NullDerefTest 2>&1 | FileCheck %s --check-prefix=LIBFUZZER_OWN_SEGV_HANDLER
3LIBFUZZER_OWN_SEGV_HANDLER: == ERROR: libFuzzer: deadly signal
4LIBFUZZER_OWN_SEGV_HANDLER: SUMMARY: libFuzzer: deadly signal
5LIBFUZZER_OWN_SEGV_HANDLER: Test unit written to ./crash-
6
7RUN: %env_asan_opts=handle_segv=1 not %run %t-NullDerefTest 2>&1 | FileCheck %s --check-prefix=LIBFUZZER_ASAN_SEGV_HANDLER
8LIBFUZZER_ASAN_SEGV_HANDLER: ERROR: AddressSanitizer: {{SEGV|access-violation}} on unknown address
9