asan_report.cc revision 7354509ec8a37262c5ea0c54f99afee8a5116ce5
1//===-- asan_report.cc ----------------------------------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file is a part of AddressSanitizer, an address sanity checker. 11// 12// This file contains error reporting code. 13//===----------------------------------------------------------------------===// 14#include "asan_internal.h" 15#include "asan_report.h" 16#include "asan_stack.h" 17#include "asan_thread_registry.h" 18 19namespace __asan { 20 21void ReportSIGSEGV(uptr pc, uptr sp, uptr bp, uptr addr) { 22 AsanReport("ERROR: AddressSanitizer crashed on unknown address %p" 23 " (pc %p sp %p bp %p T%d)\n", 24 (void*)addr, (void*)pc, (void*)sp, (void*)bp, 25 asanThreadRegistry().GetCurrentTidOrInvalid()); 26 AsanPrintf("AddressSanitizer can not provide additional info. ABORTING\n"); 27 GET_STACK_TRACE_WITH_PC_AND_BP(kStackTraceMax, pc, bp); 28 stack.PrintStack(); 29 ShowStatsAndAbort(); 30} 31 32} // namespace __asan 33