Commit Graph

26 Commits

Author SHA1 Message Date
Kostya Serebryany 78713bc574 [asan] get rid of the last operator new call in asan rtl
llvm-svn: 160347
2012-07-17 07:20:13 +00:00
Alexey Samsonov 34efb8e9b9 [ASan] Use common flags parsing machinery.
llvm-svn: 159933
2012-07-09 14:36:04 +00:00
Alexey Samsonov 52f946611f [ASan] don't include deleted header
llvm-svn: 158448
2012-06-14 13:15:45 +00:00
Alexey Samsonov 4b1f1031e6 [Sanitizer] factor out GetThreadStackTopAndBottom from ASan runtime to common.
llvm-svn: 158140
2012-06-07 07:13:46 +00:00
Alexey Samsonov 40d5b772e5 [Sanitizer] Switch to common mmap/munmap routines in ASan run-time.
llvm-svn: 158078
2012-06-06 16:15:07 +00:00
Kostya Serebryany 79437fe376 [asan] make tid u32 instead of int
llvm-svn: 158074
2012-06-06 15:06:58 +00:00
Alexey Samsonov 461820ad67 [ASan] Make printf arguments match format strings better.
llvm-svn: 158059
2012-06-06 10:46:00 +00:00
Alexey Samsonov 485d3dc363 Remove file-type tags for .cc files in ASan run-time library
llvm-svn: 157927
2012-06-04 13:50:10 +00:00
Kostya Serebryany 1d35d155fd [asan] more renaming
llvm-svn: 157747
2012-05-31 15:02:07 +00:00
Kostya Serebryany 8d03204204 [asan] more renaming
llvm-svn: 157746
2012-05-31 14:35:53 +00:00
Evgeniy Stepanov d989be1386 Fix GetFrameNameByAddr hitting stale stack guards.
In the current implementation AsanThread::GetFrameNameByAddr scans the
stack for a magic guard value to locate base address of the stack
frame. This is not reliable, especially on ARM, where the code that
stores this magic value has to construct it in a register from two
small intermediates; this register can then end up stored in a random
stack location in the prologue of another function.

With this change, GetFrameNameByAddr scans the shadow memory for the
signature of a left stack redzone instead. It is now possible to
remove the magic from the instrumentation pass for additional
performance gain. We keep it there for now just to make sure the new
algorithm does not fail in some corner case.

llvm-svn: 156710
2012-05-12 12:33:10 +00:00
Alexander Potapenko 08342aa1a1 Introduce the use_sigaltstack flag (off by default), which enables using alternate
per-thread stacks for signal handling. This allows to print more verbose error reports
for stack overflows.

llvm-svn: 154092
2012-04-05 10:54:52 +00:00
Evgeniy Stepanov 823085a8f4 [asan] Support for %z to Printf()
At the moment, asan internal Printf() uses %l modifier for printing
values of size_t and related types. This works, because we control
both the implementation of Printf and all its uses, but can be a
little misleading.

This change adds support for %z to Printf(). All callers that print
sizes and pointers as integers are switched to %zu / %zx.

llvm-svn: 153177
2012-03-21 11:32:46 +00:00
Timur Iskhodzhanov 0f9c9a5332 [ASan] Intercept CreateThread on Windows
llvm-svn: 151366
2012-02-24 15:28:43 +00:00
Kostya Serebryany b5eb5a7a05 [asan] make sure the AsanThread object is destroyed if pthread_exit is called
llvm-svn: 149940
2012-02-07 00:27:15 +00:00
Alexey Samsonov 2d3a67b73b AddressSanitizer: create AsanThreadSummary together with AsanThread (in parent thread)
llvm-svn: 148286
2012-01-17 06:35:31 +00:00
Alexey Samsonov 5d5fa5115a Test commit. Minor cleanup in AsanThread
llvm-svn: 147930
2012-01-11 08:07:51 +00:00
Kostya Serebryany 332923be32 [asan] get rid of the scary TSD destructor code. Now, we store the leaky AsanThreadSummary in TSD and never remove it from there.
llvm-svn: 147910
2012-01-11 02:03:16 +00:00
Kostya Serebryany 5be458ccfd [asan] refactoring: move some common linux/mac code to asan_posix.cc
llvm-svn: 147788
2012-01-09 19:18:27 +00:00
Kostya Serebryany 3f4b9bb4a0 [asan] do not use new/delete for the internal thread structure
llvm-svn: 147674
2012-01-06 19:44:11 +00:00
Kostya Serebryany 78d87d3b4b [asan] move {linux,mac}-specific code from asan_thread.cc to asan_{linux,mac}.cc; also add asan_procmaps.h which I forgot to add on previous commit.
llvm-svn: 147586
2012-01-05 01:07:27 +00:00
Kostya Serebryany cd271f5440 [asan] implement our own /proc/self/maps reader and use it on linux instead of sysinfo.h
llvm-svn: 147581
2012-01-05 00:44:33 +00:00
Kostya Serebryany a772096156 [asan] refactoring: don't #include <sys/mman.h> in non-os-specific files
llvm-svn: 147328
2011-12-28 23:28:54 +00:00
Kostya Serebryany bab78de8a3 [asan] discover main thread stack limits without pthread. patch by eugeni.stepanov@gmail.com
llvm-svn: 147321
2011-12-28 20:34:30 +00:00
Kostya Serebryany 6bb2f1d5b5 Recently the GCD tests started failing because of the invalid size of
FakeStack on the worker threads.
This patch moves the AsanThread initialization into a separate
procedure that's called when AsanThread objects are called for worker
threads.
Patch by glider@google.com

llvm-svn: 146752
2011-12-16 19:13:35 +00:00
Kostya Serebryany 019b76f5fd AddressSanitizer run-time library. Not yet integrated with the compiler-rt build system, but can be built using the old makefile. See details in README.txt
llvm-svn: 145463
2011-11-30 01:07:02 +00:00