[Lldb-commits] [lldb] r242902 - [asan] Display ASan history threads in reverse chronological order

2015-07-22 Thread Kuba Brecka
Author: kuba.brecka Date: Wed Jul 22 09:30:56 2015 New Revision: 242902 URL: http://llvm.org/viewvc/llvm-project?rev=242902&view=rev Log: [asan] Display ASan history threads in reverse chronological order For use-after-free bugs caught by ASan, we show an allocation and a deallocation stack trac

Re: [Lldb-commits] [PATCH] D11384: Improve check for ASAN callbacks

2015-07-21 Thread Kuba Brecka
kubabrecka added a comment. Nice improvement. Looks good to me, but please let Jason or Enrico review this as well. http://reviews.llvm.org/D11384 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/ll

[Lldb-commits] [PATCH] D11295: [asan] Display ASan history threads in reverse chronological order

2015-07-17 Thread Kuba Brecka
kubabrecka created this revision. kubabrecka added subscribers: lldb-commits, jasonmolenda, jingham, granata.enrico, zaks.anna. For use-after-free bugs caught by ASan, we show an allocation and a deallocation stack trace. Let's display them in a "most recent event first" order, this patch does

Re: [Lldb-commits] [PATCH] change asan info msg to use debugger output stream instead of adding to module warning collection

2014-12-09 Thread Kuba Brecka
Perfect, LGTM, thanks! http://reviews.llvm.org/D6577 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Re: [Lldb-commits] [PATCH] [lldb] Add @skipIfAddressSanitizerUnsupported test decorator

2014-11-15 Thread Kuba Brecka
Updating the patch to only perform the ASan tests for clang version >= 3.6.0. The older versions do not have the new ASan debugging API. Doug, could you try the patch now? http://reviews.llvm.org/D6272 Files: test/functionalities/asan/Makefile test/functionalities/asan/TestMemoryHistory.py

Re: [Lldb-commits] [PATCH] [lldb] Add @skipIfAddressSanitizerUnsupported test decorator

2014-11-14 Thread Kuba Brecka
Updating the patch. http://reviews.llvm.org/D6272 Files: test/functionalities/asan/Makefile test/functionalities/asan/TestMemoryHistory.py test/functionalities/asan/TestReportData.py test/lldbtest.py Index: test/functionalities/asan/Makefile ===

Re: [Lldb-commits] [PATCH] Mark 9 lldb unit tests for ubuntu as XFAIL

2014-11-14 Thread Kuba Brecka
This attempts to make the ASan tests work on Linux. - http://reviews.llvm.org/D6272 [lldb] Add @skipIfAddressSanitizerUnsupported test decorator http://reviews.llvm.org/D6205 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc

[Lldb-commits] [PATCH] [lldb] Add @skipIfAddressSanitizerUnsupported test decorator

2014-11-14 Thread Kuba Brecka
Adding the @skipIfAddressSanitizerUnsupported decorator, which detects whether the compiler supports "-fsanitize=address", and skips the marked tests if not. Getting rid of the stupid "findBuiltClang" logic, in favor of just using the same compiler that you use for the rest of the tests. Relate

Re: [Lldb-commits] [PATCH] Mark 9 lldb unit tests for ubuntu as XFAIL

2014-11-10 Thread Kuba Brecka
I'm fine with disabling the ASan tests on Linux. http://reviews.llvm.org/D6205 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Re: [Lldb-commits] [PATCH] Add a couple more paths where to look for just-build Clang

2014-10-13 Thread Kuba Brecka
ou have multiple > clangs and you want it to choose a specific one. I would suggest setting the > LLDB_TEST_COMPILER CMake variable. > >> On Fri, Oct 10, 2014 at 8:19 PM, Kuba Brecka wrote: >> Some LLDB build scripts seem to put the built Clang into different paths, >>

[Lldb-commits] [lldb] r219560 - Add a IsInstrumentationRuntimePresent SB API

2014-10-10 Thread Kuba Brecka
Author: kuba.brecka Date: Fri Oct 10 20:59:32 2014 New Revision: 219560 URL: http://llvm.org/viewvc/llvm-project?rev=219560&view=rev Log: Add a IsInstrumentationRuntimePresent SB API Reviewed at http://reviews.llvm.org/D5738 This adds an SB API into SBProcess: bool SBProcess::IsInstrumentation

[Lldb-commits] [PATCH] Add a IsInstrumentationRuntimePresent SB API

2014-10-10 Thread Kuba Brecka
This adds an SB API into SBProcess: bool SBProcess::IsInstrumentationRuntimePresent(InstrumentationRuntimeType type); which simply tells whether a particular InstrumentationRuntime (read "ASan") plugin is present and active. http://reviews.llvm.org/D5738 Files: include/lldb/API/SBProcess

[Lldb-commits] [PATCH] [lldb] change MemoryHistoryASan::CreateInstance to not look into all modules, but only in the executable and libclang_rt.asan dynamic library

2014-09-30 Thread Kuba Brecka
For better performance, let's change the code that checks whether there is an ASan runtime library present to only look into 1) the main executable, and 2) a dynamic library of the name starting with "libclang_rt.asan_" and ending with "_dynamic.dylib". http://reviews.llvm.org/D5556 Files: so

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
t https://code.google.com/p/address-sanitizer/wiki/Flags says. Kuba On Thu, Sep 25, 2014 at 5:05 PM, Kuba Brecka wrote: > Landed in r218481, thanks for review! > > http://reviews.llvm.org/D4527 > > > ___ lldb-commits mailing list lldb

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-25 Thread Kuba Brecka
Handle the case when ParseFrameDescription returns false. 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

Re: [Lldb-commits] [PATCH] Add ASan history threads into process_sp->GetExtendedThreadList, so they don't get freed too early

2014-09-23 Thread Kuba Brecka
Thanks. Landed in r218323. http://reviews.llvm.org/D5452 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] r218323 - Add ASan history threads into process_sp->GetExtendedThreadList, so they don't get freed too early

2014-09-23 Thread Kuba Brecka
Author: kuba.brecka Date: Tue Sep 23 13:20:24 2014 New Revision: 218323 URL: http://llvm.org/viewvc/llvm-project?rev=218323&view=rev Log: Add ASan history threads into process_sp->GetExtendedThreadList, so they don't get freed too early Reviewed at http://reviews.llvm.org/D5452 Modified: l

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 test

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 test/asan/T

[Lldb-commits] [PATCH] Add ASan history threads into process_sp->GetExtendedThreadList, so they don't get freed too early

2014-09-22 Thread Kuba Brecka
1) added the "process_sp->GetExtendedThreadList().AddThread (new_thread_sp);" line when the ThreadSP is created, and also added this into the test case 2) refactored the duplicate code into a CreateHistoryThreadFromValueObject function that is called twice. http://reviews.llvm.org/D5452 Files

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 mems

[Lldb-commits] [PATCH] Reject invalid values from ASan historical stack traces

2014-09-15 Thread Kuba Brecka
The ASan fast unwinder sometimes likes to add frames like 0x0 or 0x at the very ending of the stack trace. Let's ignore these frames. http://reviews.llvm.org/D5361 Files: source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp Index: source/Plugins/MemoryHistory/asan/MemoryHistoryASan.

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 AddressDescri

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 test/a

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 origina

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 lib/asan/

Re: [Lldb-commits] [PATCH] Fix test failure for test/functionalities/connect_remote/TestConnectRemote.py when port 12345 is already in use

2014-09-08 Thread Kuba Brecka
Landed in r217388. http://reviews.llvm.org/D5221 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] r217388 - Fix test failure for test/functionalities/connect_remote/TestConnectRemote.py when port 12345 is already in use

2014-09-08 Thread Kuba Brecka
Author: kuba.brecka Date: Mon Sep 8 12:06:54 2014 New Revision: 217388 URL: http://llvm.org/viewvc/llvm-project?rev=217388&view=rev Log: Fix test failure for test/functionalities/connect_remote/TestConnectRemote.py when port 12345 is already in use Reviewed at http://reviews.llvm.org/D5221 Mo

Re: [Lldb-commits] [PATCH] Implement ASan history threads in SB API

2014-09-05 Thread Kuba Brecka
Reviewed at http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140901/012809.html http://reviews.llvm.org/D5219 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] r217297 - Fix CMake configuration (forgot to add a file in the last commit).

2014-09-05 Thread Kuba Brecka
Author: kuba.brecka Date: Fri Sep 5 20:22:55 2014 New Revision: 217297 URL: http://llvm.org/viewvc/llvm-project?rev=217297&view=rev Log: Fix CMake configuration (forgot to add a file in the last commit). Modified: lldb/trunk/source/API/CMakeLists.txt Modified: lldb/trunk/source/API/CMakeLi

[Lldb-commits] [lldb] r217296 - Expose ThreadCollection in SB API

2014-09-05 Thread Kuba Brecka
Author: kuba.brecka Date: Fri Sep 5 20:21:19 2014 New Revision: 217296 URL: http://llvm.org/viewvc/llvm-project?rev=217296&view=rev Log: Expose ThreadCollection in SB API Reviewed at http://reviews.llvm.org/D5218 and http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140901/012828.htm

[Lldb-commits] [PATCH] Fix test failure for test/functionalities/connect_remote/TestConnectRemote.py when port 12345 is already in use

2014-09-05 Thread Kuba Brecka
My machine has port 12345 taken and that "socket.error: [Errno 48] Address already in use" and the test failure has been bugging me for too long already. Let's get a random available port instead. http://reviews.llvm.org/D5221 Files: test/functionalities/connect_remote/EchoServer.py test/fu

Re: [Lldb-commits] [PATCH] Expose ThreadCollection in SB API

2014-09-05 Thread Kuba Brecka
Addressed comments in http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140901/012815.html http://reviews.llvm.org/D5218 Files: include/lldb/API/SBDefines.h include/lldb/API/SBThreadCollection.h lldb.xcodeproj/project.pbxproj scripts/Python/build-swig-Python.sh scripts/Pyth

Re: [Lldb-commits] [lldb] r217273 - Fix CMake configuration

2014-09-05 Thread Kuba Brecka
Thank you. Kuba > Author: rnk > Date: Fri Sep 5 15:11:22 2014 > New Revision: 217273 > URL: http://llvm.org/viewvc/llvm-project?rev=217273&view=rev > Log: > Fix CMake configuration > Modified: > lldb/trunk/source/Target/CMakeLists.txt > Modified: lldb/trunk/source/Target/CMakeLists.txt > URL: >

Re: [Lldb-commits] [PATCH] [lldb] Abstract a superclass for a generic thread container

2014-09-05 Thread Kuba Brecka
Landed in r217269. http://reviews.llvm.org/D5200 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Re: [Lldb-commits] [PATCH] [lldb] Abstract a superclass for a generic thread container

2014-09-05 Thread Kuba Brecka
Indenting the initializer list. http://reviews.llvm.org/D5200 Files: include/lldb/Target/ThreadCollection.h include/lldb/Target/ThreadList.h include/lldb/lldb-forward.h lldb.xcodeproj/project.pbxproj source/Target/ThreadCollection.cpp source/Target/ThreadList.cpp Index: include/lldb/T

Re: [Lldb-commits] [PATCH] [lldb] Abstract a superclass for a generic thread container

2014-09-05 Thread Kuba Brecka
Addressing http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140901/012796.html http://reviews.llvm.org/D5200 Files: include/lldb/Target/ThreadCollection.h include/lldb/Target/ThreadList.h include/lldb/lldb-forward.h lldb.xcodeproj/project.pbxproj source/Target/ThreadCollec

Re: [Lldb-commits] [PATCH] [lldb] Rename ThreadList to ProcessThreadList and abstract a superclass for a generic thread container

2014-09-05 Thread Kuba Brecka
all belonging to the same breakpoint > in the BreakpointLocation case, and "Collection" to mean a container of a > bunch of stuff. If it's not too much bother, it might be nice to keep > using that convention? > > Jim > > > On Sep 4, 2014, at 7:08 PM

[Lldb-commits] [PATCH] [lldb] Rename ThreadList to ProcessThreadList and abstract a superclass for a generic thread container

2014-09-04 Thread Kuba Brecka
Based on the conversation at http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140901/012760.html this patch splits the current ThreadList class into a process-related thread object called "ProcessThreadList" and a generic thread list now called just ThreadList. The idea is to expos

Re: [Lldb-commits] [PATCH] [lldb] ASan history threads SB API

2014-09-03 Thread Kuba Brecka
> > When would the list be invalidated? If the list can turn wrong without > anyone being made aware of it, and your only hope is to fetch the data > again, or risk failure, then no level of caching makes sense. > My reason to add that "cache" was not really to cache the data, but to be able to it

Re: [Lldb-commits] [PATCH] [lldb] ASan history threads SB API

2014-09-03 Thread Kuba Brecka
ight > thing would happen consistently (w.r.t. caching and whatnot) because now > the plugin is handling this in a sane manner > > This last one is minor but, > +typedef std::shared_ptr HistoryThreadsSP; > + > > why do you need to define this in SBValue.cpp? > Can’t HistoryThre

Re: [Lldb-commits] [PATCH] [lldb] ASan malloc/free history threads

2014-09-03 Thread Kuba Brecka
Landed in r217116. http://reviews.llvm.org/D4596 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] r217116 - ASan malloc/free history threads

2014-09-03 Thread Kuba Brecka
Author: kuba.brecka Date: Wed Sep 3 20:03:18 2014 New Revision: 217116 URL: http://llvm.org/viewvc/llvm-project?rev=217116&view=rev Log: ASan malloc/free history threads Reviewed at http://reviews.llvm.org/D4596 Added: lldb/trunk/include/lldb/Target/MemoryHistory.h lldb/trunk/source/Pl

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] [lldb] ASan malloc/free history threads

2014-07-21 Thread Kuba Brecka
Changed the plugin name. Added a method into lldbtest.py that tries to locate Clang in the llvm-build directory, which is needed if your system compiler doesn't have ASan or it doesn't have the recent ASan debugging API. http://reviews.llvm.org/D4596 Files: include/lldb/Core/PluginManager.h

[Lldb-commits] [PATCH] [lldb] ASan malloc/free history threads

2014-07-18 Thread Kuba Brecka
Hi, I'm sending a patch that is a first take on implementing the ASan debugging facilities into LLDB, namely retrieving malloc/free recorded stack traces for a given address. This has been somewhat discussed in http://lists.cs.uiuc.edu/pipermail/lldb-dev/2014-July/004491.html. What this patch d

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 test

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 Kuba Brecka
Updated the patch to address review comments. Sent a separate refactor patch, http://reviews.llvm.org/D4545, this patch depends on it. 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_inter

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

2014-07-15 Thread Kuba Brecka
Hi kcc, glider, This patch is part of an effort to implement a more generic debugging API, as proposed in http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-July/074656.html, with first part reviewed at http://reviews.llvm.org/D4466. Now adding two new APIs: * __asan_get_report_data which returns

Re: [Lldb-commits] [PATCH] lldb: don't hardcode path to codesign_allocate

2014-06-16 Thread Kuba Brecka
Closed by r211074. http://reviews.llvm.org/D4152 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Re: [Lldb-commits] [PATCH] lldb: don't hardcode path to codesign_allocate

2014-06-16 Thread Kuba Brecka
Accept via http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140616/011320.html. http://reviews.llvm.org/D4152 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] r211074 - Don't hardcode path to codesign_allocate.

2014-06-16 Thread Kuba Brecka
Author: kuba.brecka Date: Mon Jun 16 17:55:16 2014 New Revision: 211074 URL: http://llvm.org/viewvc/llvm-project?rev=211074&view=rev Log: Don't hardcode path to codesign_allocate. Building OS X debugserver assumes you have an Xcode installation at /Application/Xcode.app. Let's instead detect whe

[Lldb-commits] [PATCH] lldb: don't hardcode path to codesign_allocate

2014-06-16 Thread Kuba Brecka
Building OS X debugserver assumes you have an Xcode installation at /Application/Xcode.app. Let's instead detect where Xcode is using xcrun. http://reviews.llvm.org/D4152 Files: tools/debugserver/source/MacOSX/CMakeLists.txt Index: tools/debugserver/source/MacOSX/CMakeLists.txt ==