summaryrefslogtreecommitdiff
path: root/lib/asan/asan_linux.cc
AgeCommit message (Collapse)Author
2012-12-13[asan] add two asan flags: fast_unwind_on_fatal and fast_unwind_on_malloc to ↵Kostya Serebryany
allow using the slow CFI-based unwinder git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170117 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03[asan] two more bits for __sparc__Kostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169141 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-23[asan] get rid of some of the uses of kPageSize. The intent is to get rid of ↵Kostya Serebryany
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
2012-11-23[ASan] intercept swapcontext on Linux onlyAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168509 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-20[asan] pop the two internal functions from the stack trace produced by ↵Kostya Serebryany
_Unwind_Backtrace (Peter Bergner) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168369 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-20[asan] more support for powerpc, patch by Peter BergnerKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168356 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-16asan: sync with gcc r193553Dmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168151 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28[asan] more refactoring to move StackTrace to sanitizer_commonKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162752 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28[asan] some renaming before we move StackTrace into sanitizer_commonKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162747 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27A few tweaks for building ASanRT against Android NDK.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162666 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24If the program is linked to a dynamic ASan runtime which is not present in ↵Alexander Potapenko
DYLD_INSERT_LIBRARIES (which, in turn, is required for our interceptors to take effect), re-exec the program with DYLD_INSERT_LIBRARIES set. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162547 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-23Intercept CFAllocator for each thread in the program.Alexander Potapenko
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
2012-07-09[ASan] Use common flags parsing machinery.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159933 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-14[Sanitizer] move rest of mmap routines to common sanitizer runtimeAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158452 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-14[Sanitizer] move portable GetEnv to common sanitizer runtimeAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158451 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-14[ASan] don't include deleted headerAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158448 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-07[Sanitizer] Fix mac build.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158141 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-07[Sanitizer] factor out GetThreadStackTopAndBottom from ASan runtime to common.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158140 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-07[Sanitizer] __asan::AsanProcMaps -> __sanitizer::ProcessMaps.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158139 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-06[Sanitizer] Switch to common mmap/munmap routines in ASan run-time.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158078 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-06[ASan] Use __sanitizer::Die() in ASan runtime.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158051 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-05[Sanitizer] remove using namespace __sanitizer linesAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157999 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-05[Sanitizer] add sanitizer_posix.cc. Move more various functions into ↵Alexey Samsonov
sanitizer_libc: sscanf, munmap, memchr git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157994 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-05[ASan] use internal_{close,read,write} in ASan runtime.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157991 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-05[ASan] use internal_open from sanitizer_libc in ASan runtimeAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157986 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-04Created files sanitizer_linux.cc and sanitizer_mac.cc for platform-specific ↵Alexey Samsonov
implementations of common functions. Turned asan_mmap into __sanitizer::internal_mmap. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157930 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-31[asan] more renamingKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157747 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-31[asan] more renamingKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157746 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-23Move AsanShadowRangeIsAvailable() from mac to posix.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157326 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-23asan: fix typo in commentDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157314 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-22[asan] nuke some old unused codeKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157250 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-22[asan] increase the stack size limit to 256M (yes, that happens); also CHECK ↵Kostya Serebryany
that the stack size is less than that on a non-main thread git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157249 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-26Avoid including link.h.Evgeniy Stepanov
It's not available on Android. We only use this header to find out if _DYNAMIC is present; declaring it "extern void*" does the trick. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153431 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-08[asan] don't use dl_iterate_phdr on linux, go back to using /proc/self/maps. ↵Kostya Serebryany
Hopefully fixes the problem reported by our mozilla friends. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@152341 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13Move the non-trivial implementation of AsanShadowRangeIsAvailable to asan_mac.ccAlexander Potapenko
to avoid crashes on Linux and Win. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150398 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-08AddressSanitizer: replace all "real_X" calls with "REAL(X)"Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150073 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-07[asan] don't crash if /proc/self/maps has enormous size (linux)Kostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149944 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-06[asan] use raw syscalls for open/close on linux to avoid being interceptedKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149892 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31[asan] remove dead codeKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149392 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19EHABI-based stack trace on ARM.Evgeniy Stepanov
The change removes the unused FLAG_fast_unwind, and forces EHABI-based unwind on ARM, and fast (FP-based) unwind everywhere else. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148468 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18Implement AsanProcMaps for Mac OS. The code from sysinfo/ is not needed ↵Alexander Potapenko
anymore and should be cleaned up. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148385 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17AddressSanitizer: add support for malloc_usable_size() functionAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148287 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-16[asan] Implement GetObjectNameAndOffset on ARM.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148236 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-13This patch moves the code reading /proc/self/environ into AsanGetEnvAlexander Potapenko
in asan_linux.cc, because /proc is unavailable on Mac. Instead the Mac version of AsanGetEnv iterates over the array of environment variables obtained from _NSGetEnviron() git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148114 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10[asan] move OS-dependent code away from asan_lock.hKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147878 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-09[asan] don't include unistd.h in the headersKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147811 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-09[asan] refactoring: move some common linux/mac code to asan_posix.ccKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147788 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-09[asan] refactoring: move all interceptors to a single fileKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147784 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-06[asan] move more code into OS-specific filesKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147671 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-06[asan] move more stuff to OS-specific filesKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147647 91177308-0d34-0410-b5e6-96231b3b80d8