[Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses
Alexey Samsonov
vonosmas at gmail.com
Wed Sep 24 18:35:09 PDT 2014
I've got only a handful of comments left.
Kostya, are you OK with the change?
================
Comment at: lib/asan/asan_debugging.cc:49
@@ +48,3 @@
+void GetInfoForHeapAddress(uptr addr, AddressDescription *descr) {
+ AsanChunkView chunk = FindHeapChunkByAddress(addr);
+ if (!chunk.IsValid()) {
----------------
Do you need to at least set descr->name to empty string?
================
Comment at: lib/asan/asan_report.cc:596
@@ -586,1 +595,3 @@
+ ScopedInErrorReport() : ScopedInErrorReport(nullptr) { }
+ explicit ScopedInErrorReport(ReportData *report) {
static atomic_uint32_t num_calls;
----------------
Just make nullptr default value for report.
explicit ScopedInErrorReport(ReportData *report = nullptr) {...}
================
Comment at: test/asan/TestCases/debug_locate.cc:31
@@ +30,3 @@
+ (region_size == sizeof(global_var)) ? "ok" : "ko");
+ // CHECK: global: global_var, ok, ok, ok
+
----------------
You can just use asserts instead of CHECK-lines here. It doesn't look like this test needs FileCheck.
assert(0 == strcmp(type, "global"));
http://reviews.llvm.org/D4527
More information about the lldb-commits
mailing list