Age | Commit message (Collapse) | Author |
|
Summary:
Currently, sanitizer_common_interceptors.inc has an implicit, undocumented
assumption that the sanitizer including it has previously declared
interceptors for memset and memmove. Since the memset, memmove, and memcpy
routines require interception by many sanitizers, we add them to the
set of common interceptions, both to address the undocumented assumption
and to speed future tool development. They are intercepted under a new
flag intercept_intrin.
The tsan interceptors are removed in favor of the new common versions. The
asan and msan interceptors for these are more complex (they incur extra
interception steps and their function bodies are exposed to the compiler)
so they opt out of the common versions and keep their own.
Reviewers: vitalybuka
Subscribers: zhaoqin, llvm-commits, kcc
Differential Revision: http://reviews.llvm.org/D18465
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@264451 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Adds strnlen to the common interceptors, under the existing flag
intercept_strlen.
Removes the now-duplicate strnlen interceptor from asan and msan.
This adds strnlen to tsan, which previously did not intercept it.
Adds a new test of strnlen to the sanitizer_common test cases.
Reviewers: samsonov
Subscribers: zhaoqin, llvm-commits, kcc
Differential Revision: http://reviews.llvm.org/D18397
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@264195 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Adds strchr, strchrnul, and strrchr to the common interceptors, under a new
common flag intercept_strchr.
Removes the now-duplicate strchr interceptor from asan and all 3
interceptors from tsan. Previously, asan did not intercept strchrnul, but
does now; previously, msan did not intercept strchr, strchrnul, or strrchr,
but does now.
http://reviews.llvm.org/D18329
Patch by Derek Bruening!
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@263992 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Adds strlen to the common interceptors, under a new common flag
intercept_strlen. This provides better sharing of interception code among
sanitizers and cleans up the inconsistent type declarations of the
previously duplicated interceptors.
Removes the now-duplicate strlen interceptor from asan, msan, and tsan.
The entry check semantics are normalized now for msan and asan, whose
private strlen interceptors contained multiple layers of checks that
included impossible-to-reach code. The new semantics are identical to the
old: bypass interception if in the middle of init or if both on Mac and not
initialized; else, call the init routine and proceed.
Patch by Derek Bruening!
Reviewers: samsonov, vitalybuka
Subscribers: llvm-commits, kcc, zhaoqin
Differential Revision: http://reviews.llvm.org/D18020
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@263177 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Trying to fix sanitizer-windows buildbot by disabling new interceptors on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261844 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This patch moves recv and recvfrom interceptors from MSan and TSan to
sanitizer_common to enable them in ASan.
Differential Revision: http://reviews.llvm.org/D17479
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261841 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258200 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255566 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Fixing `tsan_interceptors.cc`, which on OS X produces a bunch of warnings about unused constants and functions.
Differential Revision: http://reviews.llvm.org/D14381
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252165 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This patch enables the ptrace syscall interceptors for arm and adds support
for both PTRACE_GETVFPREGS and PTRACE_SETVFPREGS used to get the VFP register
from ARM.
The ptrace tests is also updated with arm and PTRACE_GETVFPREGS tests.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251321 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251059 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@250761 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@250752 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This patch enabled msan for aarch64 with 39-bit VMA and 42-bit VMA.
As defined by lib/msan/msan.h the memory layout used is for 39-bit is:
00 0000 0000 - 40 0000 0000: invalid
40 0000 0000 - 43 0000 0000: shadow
43 0000 0000 - 46 0000 0000: origin
46 0000 0000 - 55 0000 0000: invalid
55 0000 0000 - 56 0000 0000: app (low)
56 0000 0000 - 70 0000 0000: invalid
70 0000 0000 - 80 0000 0000: app (high)
And for 42-bit VMA:
000 0000 0000 - 100 0000 0000: invalid
100 0000 0000 - 11b 0000 0000: shadow
11b 0000 0000 - 120 0000 0000: invalid
120 0000 0000 - 13b 0000 0000: origin
13b 0000 0000 - 2aa 0000 0000: invalid
2aa 0000 0000 - 2ab 0000 0000: app (low)
2ab 0000 0000 - 3f0 0000 0000: invalid
3f0 0000 0000 - 400 0000 0000: app (high)
Most of tests are passing with exception of:
* Linux/mallinfo.cc
* chained_origin_limits.cc
* dlerror.cc
* param_tls_limit.cc
* signal_stress_test.cc
* nonnull-arg.cpp
The 'Linux/mallinfo.cc' is due the fact AArch64 returns the sret in 'x8'
instead of default first argument 'x1'. So a function prototype that
aims to mimic (by using first argument as the return of function) won't
work. For GCC one can make a register alias (register var asm ("r8")), but
for clang it detects is an unused variable and generate wrong code.
The 'chained_origin_limits' is probably due a wrong code generation,
since it fails only when origin memory is used
(-fsanitize-memory-track-origins=2) and only in the returned code
(return buf[50]).
The 'signal_streess_test' and 'nonnull-arg' are due currently missing variadic
argument handling in memory sanitizer code instrumentation on LLVM side.
Both 'dlerror' and 'param_tls_test' are unknown failures that require
further investigation.
All the failures are XFAIL for aarch64 for now.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@247809 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@246190 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@246184 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: Currently there is a libc++ test failing under MSAN because wcrtomb is not intercepted. This patch adds an interceptor for it.
Reviewers: samsonov, eugenis
Subscribers: tberghammer, danalbert, srhines, llvm-commits
Differential Revision: http://reviews.llvm.org/D12311
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245994 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
fuzzing. More hooks will be added later. So far this is a Linux-only feature
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243601 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
sanitizer_common. This may potentially lead to more reports from msan as it now sees the reads inside memcmp. To disable, use the flag intercept_memcmp=0. Likewise, it may potentially cause new races to appear due to more strict memcmp checking (flag strict_memcmp=1)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243595 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This fixes test/msan/Linux/syscalls.cc, and should also fix the ppc64
sanitizer buildbots which are currently failing in
"make check-sanitizer".
Reviewers: samsonov, wschmidt, eugenis
Reviewed By: eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10734
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240692 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
https://code.google.com/p/memory-sanitizer/issues/detail?id=86
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240107 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
strpbrk.
Patch by Maria Guseva.
Differential Revision: http://reviews.llvm.org/D9017
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238406 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D9456
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@236999 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Committed unreviewed with premission.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@236720 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Committed unreviewed with premission.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@236719 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D9457
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@236579 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D9251
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@235975 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D9252
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@235799 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D9222
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@235704 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D9221
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@235703 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Enabling internal ptrace for mips, which fixes some
ptrace related tests. Along with this fixing some
other failures.
Reviewers: Reviewers: eugenis, kcc, samsonov
Subscribers: dsanders, sagar, lldb-commits
Differential Revision: http://reviews.llvm.org/D7332
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@229656 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D7342
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@228125 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Committed unreviewed with permission.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227795 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Committed unreviewed with permission.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227794 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Committed unreviewed with permission.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227793 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Committed unreviewed with permission.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227792 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Committed unreviewed with permission.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227791 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Committed unreviewed with permission.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227572 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Committed unreviewed with permission.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226910 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226827 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Committed unreviewed with permission.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226794 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Committed unreviewed with permission.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226649 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Committed unreviewed with permission.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226462 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Committed unreviewed with permission.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226276 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Committed unreviewed with permission.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226275 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D6755
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224709 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D6418
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224700 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D6737
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224699 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D6384
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@222757 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D5932
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220551 91177308-0d34-0410-b5e6-96231b3b80d8
|