Commit Graph

66 Commits

Author SHA1 Message Date
Evgeniy Stepanov eac7f934f0 [msan] Cleanup public interface header.
Moved everything users are not supposed to use to a private interface header.
Documented all public interfaces. Made them safe to use even if built without
MemorySanitizer.

llvm-svn: 173800
2013-01-29 14:33:29 +00:00
Evgeniy Stepanov 9f7e8c1433 [msan] A runtime call to support custom allocators.
llvm-svn: 173687
2013-01-28 13:52:49 +00:00
Kostya Serebryany 84c7e47b5c [asan] kill some dead code
llvm-svn: 172815
2013-01-18 13:01:44 +00:00
Kostya Serebryany b3d04ede8c [asan] add a new interface function __asan_describe_address, useful for running asan-ified binary under a debugger (e.g. gdb)
llvm-svn: 171217
2012-12-29 10:18:31 +00:00
Kostya Serebryany 1cc54f0218 [asan] one more change missed at r171198
llvm-svn: 171199
2012-12-28 15:28:19 +00:00
Evgeniy Stepanov 375aec7476 [msan] Add a missing file from r169858.
llvm-svn: 169860
2012-12-11 12:44:43 +00:00
Alexander Potapenko 1746f555ee Add a libsanitizer API __sanitizer_sandbox_on_notify(void* reserved), which should be used by
the client programs to notify the tools that sandboxing is about to be turned on.

llvm-svn: 169732
2012-12-10 13:10:40 +00:00
Alexey Samsonov a0e4706fe6 ASan: change the strategy we use for installing malloc/free/symbolization hooks on Linux: don't provide a default no-op implementations for hooks in runtime, and optionally call hooks if they are provided by the user. Don't force weak interface functions into runtime.
llvm-svn: 169641
2012-12-07 22:01:28 +00:00
Alexey Samsonov 45b6edbd1d ASan: add new interface functions - __asan_(un)poison_stack_memory. Calls to these functions are inserted by the instrumentation pass in use-after-scope mode
llvm-svn: 169201
2012-12-04 01:38:15 +00:00
Kostya Serebryany 386e2d853b [asan] support x32 mode in the fast stack unwinder. Patch by H.J. Lu
llvm-svn: 168306
2012-11-19 10:31:00 +00:00
Alexey Samsonov fd67c83e7e [Sanitizer]: add __sanitizer_set_report_fd function to alter file descriptor for error reports
llvm-svn: 167290
2012-11-02 09:23:36 +00:00
Alexey Samsonov 78c340d205 [ASan] Change __asan_set_on_error_callback to weak overridable __asan_on_error, so that ASan would call the latter even if it finds the error early (i.e. during module initialization)
llvm-svn: 165008
2012-10-02 14:06:39 +00:00
Alexey Samsonov e29c6731aa [Sanitizer/ASan] Simplify the code that prints and symbolizes stack traces. Fall back to module+offset if user-provided symbolizer failed. Use weak function __asan_symbolize instead of __asan_set_symbolize_callback in ASan interface, so that we're able to symbolize reports for errors that happen before the main() is called, for example, during module initialization.
llvm-svn: 165000
2012-10-02 12:11:17 +00:00
Alexey Samsonov a555b3faf4 [ASan] Apply some ASan-relevant pieces of patch by Ruben Van Boxem. In the same time, remove ASan from CMake build on Windows after conversation with Timur. We don't want to support building ASan on Windows until it is in a working state.
llvm-svn: 164486
2012-09-24 11:43:40 +00:00
Kostya Serebryany 45d849c4bd [asan] add asan option log_path=PATH to let users redirect asan reports to a file PATH.PID instead of stderr
llvm-svn: 163872
2012-09-14 04:35:14 +00:00
Chandler Carruth 1aa4fef601 Relocate the external headers provided by ASan and the common sanitizer
library.

These headers are intended to be available to user code when built with
AddressSanitizer (or one of the other sanitizer's in the future) to
interface with the runtime library. As such, they form stable external
C interfaces, and the headers shouldn't be located within the
implementation.

I've pulled them out into what seem like fairly obvious locations and
names, but I'm wide open to further bikeshedding of these names and
locations.

I've updated the code and the build system to cope with the new
locations, both CMake and Makefile. Please let me know if this breaks
anyone's build.

The eventual goal is to install these headers along side the Clang
builtin headers when we build the ASan runtime and install it. My
current thinking is to locate them at:

  <prefix>/lib/clang/X.Y/include/sanitizer/common_interface_defs.h
  <prefix>/lib/clang/X.Y/include/sanitizer/asan_interface.h
  <prefix>/lib/clang/X.Y/include/sanitizer/...

But maybe others have different suggestions?

Fixing the style of the #include between these headers at least unblocks
experimentation with installing them as they now should work when
installed in these locations.

llvm-svn: 162822
2012-08-29 02:27:54 +00:00