Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-09-26 Thread Kuba Brecka
Reverted in r218501 due to test failure on the sanitizer-x86_64-linux buildbot. Committed again in r218538 with a fix, intptr_t - uintptr_t, and an extra free(heap_ptr) to fix the LeakSanitizer report. Both changes are in the test file only (debug_locate.cc). http://reviews.llvm.org/D4527

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-09-25 Thread Kuba Brecka
Landed in r218481, thanks for review! http://reviews.llvm.org/D4527 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-09-22 Thread Kuba Brecka
Addressing review comments. http://reviews.llvm.org/D4527 Files: include/sanitizer/asan_interface.h lib/asan/asan_debugging.cc lib/asan/asan_globals.cc lib/asan/asan_interface_internal.h lib/asan/asan_report.cc lib/asan/asan_report.h test/asan/TestCases/debug_locate.cc

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-09-22 Thread Kuba Brecka
Uploading patch with more context. http://reviews.llvm.org/D4527 Files: include/sanitizer/asan_interface.h lib/asan/asan_debugging.cc lib/asan/asan_globals.cc lib/asan/asan_interface_internal.h lib/asan/asan_report.cc lib/asan/asan_report.h test/asan/TestCases/debug_locate.cc

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-09-16 Thread Kuba Brecka
! In D4527#33, @samsonov wrote: Why not internal_strncpy(descr-name, vars[i].name_pos, Min(descr-name_size - 1, vars[i].name_len)) ? Because that would not write \0 after the string (we're copying just a part of the string pointed to by vars[i].name_pos). So I would have to memset the

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-09-12 Thread Kuba Brecka
Updated patch. Consider introducing a struct for address description instead of passing quadruple (name, name_size, region_address, region_size) around. It would be much easier to modify it later. You can also add region_kind (global, stack etc.) string there. Introduced AddressDescription.

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-09-12 Thread Alexey Samsonov
Getting closer. Comment at: lib/asan/asan_debugging.cc:35 @@ +34,3 @@ + descr-name[0] = 0; + internal_strncat(descr-name, vars[i].name_pos, + Min(descr-name_size, vars[i].name_len)); Why not internal_strncpy(descr-name,

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-09-12 Thread Alexey Samsonov
! In D4527#31, @kubabrecka wrote: Getting closer. Thanks for the patience :) Why not internal_strncpy(descr-name, vars[i].name_pos, Min(descr-name_size - 1, vars[i].name_len)) ? Because that would not write \0 after the string (we're copying just a part of the string pointed to by

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-09-11 Thread Alexey Samsonov
Comment at: lib/asan/asan_debugging.cc:38 @@ +37,3 @@ +uptr var_name_len = vars[i].name_len; +if (vars[i].name_len name_size - 1) var_name_len = name_size - 1; +memcpy(name, vars[i].name_pos, var_name_len); internal_strncpy?

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-09-09 Thread Kuba Brecka
Addressing comments from review. http://reviews.llvm.org/D4527 Files: include/sanitizer/asan_interface.h lib/asan/asan_debugging.cc lib/asan/asan_globals.cc lib/asan/asan_interface_internal.h lib/asan/asan_report.cc lib/asan/asan_report.h test/asan/TestCases/debug_locate.cc

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-09-08 Thread Kuba Brecka
Addressing the review comments. Tried to minimize any code duplication. Added full context. http://reviews.llvm.org/D4527 Files: include/sanitizer/asan_interface.h lib/asan/asan_debugging.cc lib/asan/asan_globals.cc lib/asan/asan_interface_internal.h lib/asan/asan_report.cc

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-09-08 Thread Alexey Samsonov
Comment at: lib/asan/asan_globals.cc:85 @@ -84,2 +84,3 @@ -bool DescribeAddressIfGlobal(uptr addr, uptr size) { +bool DescribeOrGetInfoIfGlobal(uptr addr, uptr size, bool only_get_info, + char *name, uptr name_size, uptr *region_address,

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-09-08 Thread Kuba Brecka
Any specific reason to not expose report_data structure layout in the interface header? This pack of functions doesn't look nice. It's to make it easier to use from LLDB. When we add a new function, it's easier to check whether that symbol exists than to version this struct. See the original

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-07-30 Thread Alexander Potapenko
Looks mostly good. Comment at: lib/asan/asan_debugging.cc:51 @@ +50,3 @@ + uptr *region_address, uptr *region_size) { + // check for shadow + if (!AddrIsInMem(addr)) { Single-line comments must start with a capital letter and end

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-07-29 Thread Alexander Potapenko
Sorry for the delay, will review tomorrow (MSK time) http://reviews.llvm.org/D4527 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-07-28 Thread Kuba Brecka
ping http://reviews.llvm.org/D4527 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-07-16 Thread Kuba Brecka
Comment at: lib/asan/asan_report.cc:947 @@ +946,3 @@ + + ScopedInErrorReport in_report; + Kostya Serebryany wrote: why did you move this here? Because ScopedInErrorReport's constructor does things where I'd like the report data to already be available. Namely,

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-07-16 Thread Duncan P. N. Exon Smith
On 2014-Jul-16, at 14:54, Kuba Brecka kuba.bre...@gmail.com wrote: Comment at: lib/asan/asan_report.cc:35 @@ +34,3 @@ +struct ReportData { + bool already_happened = 0; + uptr pc = 0; Alexey Samsonov wrote: I believe this wouldn't compile on Windows

Re: [Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses

2014-07-16 Thread Kuba Brecka
Update addressing review comments. http://reviews.llvm.org/D4527 Files: include/sanitizer/asan_interface.h lib/asan/asan_debugging.cc lib/asan/asan_globals.cc lib/asan/asan_interface_internal.h lib/asan/asan_report.cc lib/asan/asan_report.h test/asan/TestCases/debug_locate.cc