| //===-- asan_report.cc ----------------------------------------------------===// |
| // |
| // The LLVM Compiler Infrastructure |
| // |
| // This file is distributed under the University of Illinois Open Source |
| // License. See LICENSE.TXT for details. |
| // |
| //===----------------------------------------------------------------------===// |
| // |
| // This file is a part of AddressSanitizer, an address sanity checker. |
| // |
| // This file contains error reporting code. |
| //===----------------------------------------------------------------------===// |
| #include "asan_internal.h" |
| #include "asan_report.h" |
| #include "asan_stack.h" |
| #include "asan_thread_registry.h" |
| |
| namespace __asan { |
| |
| void ReportSIGSEGV(uptr pc, uptr sp, uptr bp, uptr addr) { |
| AsanReport("ERROR: AddressSanitizer crashed on unknown address %p" |
| " (pc %p sp %p bp %p T%d)\n", |
| (void*)addr, (void*)pc, (void*)sp, (void*)bp, |
| asanThreadRegistry().GetCurrentTidOrInvalid()); |
| AsanPrintf("AddressSanitizer can not provide additional info. ABORTING\n"); |
| GET_STACK_TRACE_WITH_PC_AND_BP(kStackTraceMax, pc, bp); |
| stack.PrintStack(); |
| ShowStatsAndAbort(); |
| } |
| |
| } // namespace __asan |