kubabrecka created this revision.
kubabrecka added reviewers: clayborg, jasonmolenda, jingham.
kubabrecka added subscribers: lldb-commits, zaks.anna.
kubabrecka set the repository for this revision to rL LLVM.
kubabrecka added a project: Sanitizers.
https://reviews.llvm.org/D27012 will add more report types into ASan that will
be reported via the debugging API. This patch in LLDB provides human-friendly
bug descriptions.
Repository:
rL LLVM
https://reviews.llvm.org/D27017
Files:
source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
Index:
source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
===================================================================
---
source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
+++
source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
@@ -216,10 +216,46 @@
return "Global buffer overflow detected";
} else if (description == "unknown-crash") {
return "Invalid memory access detected";
+ } else if (description == "stack-overflow") {
+ return "Stack overflow detected (recursion too deep)";
+ } else if (description == "null-deref") {
+ return "Null pointer dereference detected";
+ } else if (description == "wild-jump") {
+ return "Wild pointer jump detected";
+ } else if (description == "wild-addr-write") {
+ return "Write to a wild pointer detected";
+ } else if (description == "wild-addr-read") {
+ return "Read from a wild pointer detected";
+ } else if (description == "wild-addr") {
+ return "Access to a wild pointer detected";
+ } else if (description == "signal") {
+ return "Deadly signal detected";
+ } else if (description == "double-free") {
+ return "Attempt to deallocate a freed object detected";
+ } else if (description == "new-delete-type-mismatch") {
+ return "Deallocation of a wrong size detected";
+ } else if (description == "bad-free") {
+ return "Attempt to free a non-allocated address detected";
+ } else if (description == "alloc-dealloc-mismatch") {
+ return "Mismatch between allocation and deallocation APIs detected";
+ } else if (description == "bad-malloc_usable_size") {
+ return "Invalid call to malloc_usable_size detected";
+ } else if (description == "bad-__sanitizer_get_allocated_size") {
+ return "Invalid call to __sanitizer_get_allocated_size detected";
+ } else if (description == "param-overlap") {
+ return "Overlapping memory ranges detected";
+ } else if (description == "negative-size-param") {
+ return "Negative size memory access detected";
+ } else if (description == "bad-__sanitizer_annotate_contiguous_container") {
+ return "Invalid call to __sanitizer_annotate_contiguous_container
detected";
+ } else if (description == "odr-violation") {
+ return "Initialization order problem detected";
+ } else if (description == "invalid-pointer-pair") {
+ return "Invalid pointer pair in arithmetic operation detected";
}
// for unknown report codes just show the code
- return description;
+ return "AddressSanitizer detected: " + description;
}
bool AddressSanitizerRuntime::NotifyBreakpointHit(
Index: source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
===================================================================
--- source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
+++ source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
@@ -216,10 +216,46 @@
return "Global buffer overflow detected";
} else if (description == "unknown-crash") {
return "Invalid memory access detected";
+ } else if (description == "stack-overflow") {
+ return "Stack overflow detected (recursion too deep)";
+ } else if (description == "null-deref") {
+ return "Null pointer dereference detected";
+ } else if (description == "wild-jump") {
+ return "Wild pointer jump detected";
+ } else if (description == "wild-addr-write") {
+ return "Write to a wild pointer detected";
+ } else if (description == "wild-addr-read") {
+ return "Read from a wild pointer detected";
+ } else if (description == "wild-addr") {
+ return "Access to a wild pointer detected";
+ } else if (description == "signal") {
+ return "Deadly signal detected";
+ } else if (description == "double-free") {
+ return "Attempt to deallocate a freed object detected";
+ } else if (description == "new-delete-type-mismatch") {
+ return "Deallocation of a wrong size detected";
+ } else if (description == "bad-free") {
+ return "Attempt to free a non-allocated address detected";
+ } else if (description == "alloc-dealloc-mismatch") {
+ return "Mismatch between allocation and deallocation APIs detected";
+ } else if (description == "bad-malloc_usable_size") {
+ return "Invalid call to malloc_usable_size detected";
+ } else if (description == "bad-__sanitizer_get_allocated_size") {
+ return "Invalid call to __sanitizer_get_allocated_size detected";
+ } else if (description == "param-overlap") {
+ return "Overlapping memory ranges detected";
+ } else if (description == "negative-size-param") {
+ return "Negative size memory access detected";
+ } else if (description == "bad-__sanitizer_annotate_contiguous_container") {
+ return "Invalid call to __sanitizer_annotate_contiguous_container detected";
+ } else if (description == "odr-violation") {
+ return "Initialization order problem detected";
+ } else if (description == "invalid-pointer-pair") {
+ return "Invalid pointer pair in arithmetic operation detected";
}
// for unknown report codes just show the code
- return description;
+ return "AddressSanitizer detected: " + description;
}
bool AddressSanitizerRuntime::NotifyBreakpointHit(
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits