History log of /external/compiler-rt/lib/asan/asan_thread.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5d71de26cedae3dafc17449fe0182045c0bd20e8 21-Jul-2014 Stephen Hines <srhines@google.com> Update compiler-rt for rebase to r212749.

Includes a cherry-pick of:
r213309 - fixes umodsi3

Change-Id: Ic7367e3586b6af7ef74bee6a8cf437d5f28d975a
/external/compiler-rt/lib/asan/asan_thread.cc
2d1fdb26e458c4ddc04155c1d421bced3ba90cd0 29-May-2014 Stephen Hines <srhines@google.com> Update compiler-rt aosp/master for 3.5 (r209699) rebase.

Change-Id: I158a30186f0faea2e2400e9dfdd878db2eb40e90
/external/compiler-rt/lib/asan/asan_thread.cc
ae914e2fc00c60d0f8f8b9b06bcc8b0b2d470181 13-Nov-2013 Kostya Serebryany <kcc@google.com> [asan] fix a leak in tds (https://code.google.com/p/address-sanitizer/issues/detail?id=233)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
53177247698bfba075f2d5b255a447fc3ced6976 24-Oct-2013 Peter Collingbourne <peter@pcc.me.uk> Introduce an operator new for LowLevelAllocator, and convert most users to it.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
1fe68b87dcd9be36b5b4d35e74cc5b0666500ec4 18-Oct-2013 Kostya Serebryany <kcc@google.com> [asan] allocate AsanThreadContext using LowLevelAllocator instead of mmap to save space

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
6d95869fa900da9ddd68e15e2aa065854cfa176b 18-Oct-2013 Kostya Serebryany <kcc@google.com> [asan] reduce the size of AsanThreadContext by storing the stack trace in the stack depot

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
6866dba92ac842fc513ba339ba849a953ffb7507 15-Oct-2013 Dmitry Vyukov <dvyukov@google.com> tsan: move verbosity flag to CommonFlags



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
c519335c2d6d32acaac32c0595f08a05081567e7 14-Oct-2013 Sergey Matveev <earthdok@google.com> [lsan] Support ASan's stack-use-after-return mode in LSan.

Treat the fake stack as live memory.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
e86e35fbe861e73c5991200510a028877427b3e7 14-Oct-2013 Sergey Matveev <earthdok@google.com> [asan] Improve thread lifetime tracking on POSIX systems.

Call AsanThread::Destroy() from a late-running TSD destructor.
Previously we called it before any user-registered TSD destructors, which caused
false positives in LeakSanitizer.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
e1c68c319a0113be832da17a777892353a8b5f23 27-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] introduce run-time flag uar_stack_size_log to control the size of FakeStack; don't crash when the fake stack is exhausted, move some code to .cc file

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
621770a196153ee61b338d34bafd1170c1899444 19-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] fix one more async-signal-safety issue with use-after-return

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
230e52f4e91b53f05ce19dbbf11047f4a0113483 18-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] add a run-time option detect_stack_use_after_return, add verbosity output for fake stack

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
9433af375c7813486be91d2ac76f5072ee41818d 13-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] second attempt to use TLS with fake stack. This time it looks (more) async-signal safe.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
b39a604ff9d68ba7400197fca341771878443a69 12-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] (part 2) don't lazy-init fake_stack if we only need to check that fake_stack exists (should fix 32-bit builds)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
dcf98bf49d68533c7aebadbf6c4467afdd486c99 12-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] don't lazy-init fake_stack if we only need to check that fake_stack exists (should fix 32-bit builds)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
c98fc1f8e52812cfaf5b19a29db5ed56acb0a682 12-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] hopefully make the FakeStack async-signal safe, enable the related test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
717ece58e18190c4aef50bd16254db1d74036395 02-Sep-2013 Alexey Samsonov <samsonov@google.com> Improve collecting malloc stats in ASan

Summary:
This change makes races between updates of thread-local stats and
merging all the thread-local stats together less harmful.

Reviewers: kcc

Reviewed By: kcc

CC: dvyukov, llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1572

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
c6ac98d7fcc81768b2ef7ddc785c27e3fc1bdef6 08-Jul-2013 Sergey Matveev <earthdok@google.com> [lsan] Handle fork() correctly.

Update the main thread's os_id on every pthread_create, and before
initiating leak checking. This ensures that we have the correct os_id even if we
have forked after Init().

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
7a0bba457ee05ced3adf37a0c0790d0ed23a5446 26-Jun-2013 Kostya Serebryany <kcc@google.com> [asan] initialize fake_stack lazily and increase its maximal size. This makes -fsanitize=address,use-after-return more robust: all SPEC tests pass now. In the default mode thread stacks become a bit smaller.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
200afbd8ba4904241c1ebcef4fa79d739ca01f73 21-Jun-2013 Sergey Matveev <earthdok@google.com> [asan] Move lsan_disabled out of thread context.

Fix for the case where disabler is used in pthread key destructor.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
7c9ffde46a475d6dd739e977b547c27ac5968976 04-Jun-2013 Timur Iskhodzhanov <timurrrr@google.com> Fix ALIGNED misuse in asan_thread.cc (built on all platforms); also, add a comment to the ALIGNED macro describing the correct usage

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
40527a579131210fcfa2373620a0c2200800e7c4 03-Jun-2013 Kostya Serebryany <kcc@google.com> [asan] ASan Linux MIPS32 support (compiler-rt part), patch by Jyun-Yan Y

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
5e719a705666988781b9735d62cafc808ade60e2 03-Jun-2013 Sergey Matveev <earthdok@google.com> [lsan] Add __lsan_disable() and __lsan_enable().

Objects allocated after a call to __lsan_disable() will be treated as
live memory. Also add a ScopedDisabler.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
12d01bac1c09a8412546e71485a3cba2d416c0fc 29-May-2013 Sergey Matveev <earthdok@google.com> [asan] Make ASan report the correct thread address ranges to LSan.

This CL enables thread support in LSan when used on top of ASan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
f1ac1a44b4ed022f0a587a6bd711b1afbd3f8f62 21-May-2013 Sergey Matveev <earthdok@google.com> [asan] LSan hooks in asan_thread.cc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
a27bdf70ca24202dce21cf7c1a387aeaa400d889 05-Apr-2013 Kostya Serebryany <kcc@google.com> [sanitizer] found a bug by code inspection: CHECK(a=b) instead of CHECK(a==b). Was puzzled why lint did not catch it. Turns out this check was disabled for asan source. fix all cases and enable the check

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
7e8434940a1fe7dce531d4c458ccd714da48f609 28-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Speed-up initialization-order checking: create and use fast versions of PoisonShadow functions, store copies of __asan_global descriptors in a vector instead of list of pointers. This gives 3x speedup on both benchmarks and real binaries with lots of globals.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
50f3daa00d3da0a80c8798a3e977705e96ec106f 22-Mar-2013 Kostya Serebryany <kcc@google.com> [asan] Change the way we report the alloca frame on stack-buff-overflow.

Before: the function name was stored by the compiler as a constant string
and the run-time was printing it.
Now: the PC is stored instead and the run-time prints the full symbolized frame.
This adds a couple of instructions into every function with non-empty stack frame,
but also reduces the binary size because we store less strings (I saw 2% size reduction).
This change bumps the asan ABI version to v3.

compiler-rt part, llvm part will follow.

Example of report (now):
==31711==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffa77cf1c5 at pc 0x41feb0 bp 0x7fffa77cefb0 sp 0x7fffa77cefa8
READ of size 1 at 0x7fffa77cf1c5 thread T0
#0 0x41feaf in Frame0(int, char*, char*, char*) stack-oob-frames.cc:20
#1 0x41f7ff in Frame1(int, char*, char*) stack-oob-frames.cc:24
#2 0x41f477 in Frame2(int, char*) stack-oob-frames.cc:28
#3 0x41f194 in Frame3(int) stack-oob-frames.cc:32
#4 0x41eee0 in main stack-oob-frames.cc:38
#5 0x7f0c5566f76c (/lib/x86_64-linux-gnu/libc.so.6+0x2176c)
#6 0x41eb1c (/usr/local/google/kcc/llvm_cmake/a.out+0x41eb1c)
Address 0x7fffa77cf1c5 is located in stack of thread T0 at offset 293 in frame
#0 0x41f87f in Frame0(int, char*, char*, char*) stack-oob-frames.cc:12 <<<<<<<<<<<<<< this is new
This frame has 6 object(s):
[32, 36) 'frame.addr'
[96, 104) 'a.addr'
[160, 168) 'b.addr'
[224, 232) 'c.addr'
[288, 292) 's'
[352, 360) 'd'




git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
195369bb7f59896487c4542716ca9c5d53975e78 22-Mar-2013 Dmitry Vyukov <dvyukov@google.com> asan: fix lint warning about line length


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
def1be9b7ef4091ce465c0fbfb26cdb52128ade8 21-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Switch ASan to generic ThreadRegistry from sanitizer_common. Delete ASan-specific AsanThreadRegistry.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
89c1384464848c1ad041becf8b97936fa10de21b 20-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Move GetCurrentThread/SetCurrentThread from AsanThreadRegistry class into plain functions: they don't actually use registry

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
541cfb10f5daa17e48eb42365a74233cd551c545 18-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] fix two off-by-one errors that seem to affect only PowerPC because only there the stack top may be equal to the address space top. Noted by Andreas Schwab in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55975#c11 . Also make swapcontext interceptor a bit more robust

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
f67ec2b6e8d2ae328c27de0b026eea2d6667836e 23-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] get rid of some of the uses of kPageSize. The intent is to get rid of it completely to support platforms with multiple possible page sizes.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
5af39e50366f1aacbebc284f572f08ad1ad07357 21-Nov-2012 Kostya Serebryany <kcc@google.com> [asan/tsan] do not use __WORDSIZE macro, as it is glibc-private thing. Instead, define our own SANITIZER_WORDSIZE

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
e406c8c47570659287e619e23479f9fb6640299e 15-Nov-2012 Alexander Potapenko <glider@google.com> [ASan] Revert r168040 and r168043 and take a cleaner solution suggested by Kostya: return the known frame name for fake stack instead of looking it up.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
c78349f2167766d275ebb7e7113828c469ec7bf0 15-Nov-2012 Alexander Potapenko <glider@google.com> [ASan] Minor fix: return to the last byte of the fake stack if we've raced by.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
036945d16d94ed6e83a85e243d7fe89687b9baf8 15-Nov-2012 Alexander Potapenko <glider@google.com> [ASan] Poison the leftmost shadow byte with a special value so that we can find
the beginning of the fake frame when reporting an use-after-return error.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=126



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
6d924facc5c979a0d25f484cffcdb51c766ed551 06-Sep-2012 Kostya Serebryany <kcc@google.com> [asan] increase max stack size to 256 (+test)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
c3390df6670cb166119b961eb27a033fb9073496 28-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] some renaming before we move StackTrace into sanitizer_common

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
947fbd1a073fcd38988c1ec131452e99bb0313f8 27-Aug-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Use low-level allocator in flag parsing to avoid calling malloc() before ASan/TSan initialization is done

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
75b19ebf25af204cf209d108997272822241d6da 23-Jul-2012 Alexander Potapenko <glider@google.com> Intercept CFAllocator for each thread in the program.
Test that child threads use the ASan allocator, that allocated memory can be passed to another thread and deallocated on it.
This should fix http://code.google.com/p/address-sanitizer/issues/detail?id=81


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
b134ffa00ce2a4cbf7f48ac029e31c3e6e23ff6b 17-Jul-2012 Kostya Serebryany <kcc@google.com> [asan] get rid of the last operator new call in asan rtl

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
cb8c4dce691097718d5af41b36899b72ef4b1d84 09-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] Use common flags parsing machinery.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
996651d09e56caa91ffcc33bf1a13a283cfcd5e2 14-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] don't include deleted header

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
e5931fd7d2a74fd7fb60bd8d7f644cca51a24364 07-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] factor out GetThreadStackTopAndBottom from ASan runtime to common.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
a25b3463477d2a825df4f656001fc07c594b35ac 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Switch to common mmap/munmap routines in ASan run-time.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
e0cff0bc20ae51790c8edfbceb817e18ebf5355e 06-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] make tid u32 instead of int

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
5bcca4e33ececdddd8e9e07619c129e870492251 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] Make printf arguments match format strings better.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
e5f5895bda30f374b0b51412fd4d837fa59aed66 04-Jun-2012 Alexey Samsonov <samsonov@google.com> Remove file-type tags for .cc files in ASan run-time library

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
ee3925515e4c7966f3ef489f687aa7e5692806a9 31-May-2012 Kostya Serebryany <kcc@google.com> [asan] more renaming

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
3f4c3875c42078e22c7e5356c5746fd18756d958 31-May-2012 Kostya Serebryany <kcc@google.com> [asan] more renaming

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
3972ea03aa52d81ca324945ba94eea22d403df12 12-May-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@156710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
f03d8afc8b8dd072c4e2884a7475ee28ac5f3f41 05-Apr-2012 Alexander Potapenko <glider@google.com> 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.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
739eb7984139d457216623347ae3b7a706c0aadf 21-Mar-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [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.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
600972e3427173cc8904d741decd1af0ed5de9fd 24-Feb-2012 Timur Iskhodzhanov <timurrrr@google.com> [ASan] Intercept CreateThread on Windows

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@151366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
f58f998066db0231e521169d2f50af439ceecb49 07-Feb-2012 Kostya Serebryany <kcc@google.com> [asan] make sure the AsanThread object is destroyed if pthread_exit is called

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
55cdfc6c5af92560bc0623b5a0d70af71511c3c8 17-Jan-2012 Alexey Samsonov <samsonov@google.com> AddressSanitizer: create AsanThreadSummary together with AsanThread (in parent thread)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
a31df5ca61f10154c809d4aa77978628c0c74f76 11-Jan-2012 Alexey Samsonov <samsonov@google.com> Test commit. Minor cleanup in AsanThread

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
af3441580555ceed092170232cd5f2cc180f19f4 11-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] get rid of the scary TSD destructor code. Now, we store the leaky AsanThreadSummary in TSD and never remove it from there.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
a7e760a53bc43b8e09bfdf5cd6f215267ba99729 09-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] refactoring: move some common linux/mac code to asan_posix.cc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
a6b52264e1231bfc4ee9a2d9a4f32678c97295f0 06-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] do not use new/delete for the internal thread structure

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
c549dd7b5fa5fb97270f57067797224cee0429f2 05-Jan-2012 Kostya Serebryany <kcc@google.com> [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.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
df499b44de81fc757a789878f07fcaf19ebb0016 05-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] implement our own /proc/self/maps reader and use it on linux instead of sysinfo.h

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
a874fe5b5d67152e4e737498d532eec80940bdcd 29-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] refactoring: don't #include <sys/mman.h> in non-os-specific files

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
ab9da7ec5e4194ba0d0a90e00e9f29dbc8d34c69 28-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] discover main thread stack limits without pthread. patch by eugeni.stepanov@gmail.com

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
69eca73ac96688c8bfe1f23ee006af29c7858c40 16-Dec-2011 Kostya Serebryany <kcc@google.com> 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



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc
1e172b4bdec57329bf904f063a29f99cddf2d85f 30-Nov-2011 Kostya Serebryany <kcc@google.com> 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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_thread.cc