forked from OSchip/llvm-project
[asan] Use more generic string in error message
Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis, alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37609 llvm-svn: 312858
This commit is contained in:
parent
6bed9de3d5
commit
e7e7194a73
|
@ -38,7 +38,9 @@ void AsanOnDeadlySignal(int signo, void *siginfo, void *context) {
|
|||
int code = (int)((siginfo_t*)siginfo)->si_code;
|
||||
// Write the first message using fd=2, just in case.
|
||||
// It may actually fail to write in case stderr is closed.
|
||||
internal_write(2, "ASAN:DEADLYSIGNAL\n", 18);
|
||||
internal_write(2, SanitizerToolName, internal_strlen(SanitizerToolName));
|
||||
static const char kDeadlySignal[] = ":DEADLYSIGNAL\n";
|
||||
internal_write(2, kDeadlySignal, sizeof(kDeadlySignal) - 1);
|
||||
SignalContext sig = SignalContext::Create(siginfo, context);
|
||||
|
||||
// Access at a reasonable offset above SP, or slightly below it (to account
|
||||
|
|
|
@ -71,17 +71,17 @@ int main() {
|
|||
return DoSEGV();
|
||||
}
|
||||
|
||||
// CHECK0-NOT: ASAN:DEADLYSIGNAL
|
||||
// CHECK0-NOT: AddressSanitizer:DEADLYSIGNAL
|
||||
// CHECK0-NOT: AddressSanitizer: SEGV on unknown address
|
||||
// CHECK0: User sigaction installed
|
||||
// CHECK0-NEXT: User sigaction called
|
||||
|
||||
// CHECK1: User sigaction installed
|
||||
// CHECK1-NEXT: User sigaction called
|
||||
// CHECK1-NEXT: ASAN:DEADLYSIGNAL
|
||||
// CHECK1-NEXT: AddressSanitizer:DEADLYSIGNAL
|
||||
// CHECK1: AddressSanitizer: SEGV on unknown address
|
||||
|
||||
// CHECK2-NOT: User sigaction called
|
||||
// CHECK2: User sigaction installed
|
||||
// CHECK2-NEXT: ASAN:DEADLYSIGNAL
|
||||
// CHECK2-NEXT: AddressSanitizer:DEADLYSIGNAL
|
||||
// CHECK2: AddressSanitizer: SEGV on unknown address
|
||||
|
|
Loading…
Reference in New Issue