Age | Commit message (Collapse) | Author |
|
Change-Id: I59213ad8ee3c88ec55c821e0160310dd624cae54
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@358706 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The generic version of comparesf2 defines __cmpsf2 alias for libgcc
compatibility, but the ARM overlay is missing the alias.
Differential Revision: https://reviews.llvm.org/D60805
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@358542 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: CFA was setup incorrectly, as there is an 8-byte gap at the top of the stack for SP 16-byte alignment purposes.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: kubamracek, javed.absar, #sanitizers, llvm-commits, pcc
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D60798
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@358535 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Also hide __cpu_inicator_init and __cpu_features2
for similar reasons.
Summary: Make __cpu_model a hidden symbol, to match libgcc.
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59561
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@356581 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Explicitly print 4 registers/line in each iteration during register
dump. Reduces logcat spam as we get a single logcat message per call to
Printf(), even if the output isn't newline-terminated. This brings the
output format in logcat closer to that of the normal textual dump.
Reviewers: eugenis, pcc
Reviewed By: pcc
Subscribers: kubamracek, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D59320
Change-Id: I84e48bb2ea11a32173faa39f8b742d0623449ebd
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@356166 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: kcc, pcc
Subscribers: kubamracek, mgorny, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D58162
Change-Id: I1c17d53f07f7954f670b675d9739d358348b1ac4
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@354156 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
With tag_in_free=1, malloc() can not assume that the memory is untagged,
and needs to retag is to 0.
Reviewers: pcc, kcc
Subscribers: kubamracek, jfb, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D58158
Change-Id: I8e09206f2d1d9041457943ad8a3cd638cfbb8778
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@354155 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This change change the instrumentation to allow users to view the registers at the point at which tag mismatch occured. Most of the heavy lifting is done in the runtime library, where we save the registers to the stack and emit unwind information. This allows us to reduce the overhead, as very little additional work needs to be done in each __hwasan_check instance.
In this implementation, the fast path of __hwasan_check is unmodified. There are an additional 4 instructions (16B) emitted in the slow path in every __hwasan_check instance. This may increase binary size somewhat, but as most of the work is done in the runtime library, it's manageable.
The failure trace now contains a list of registers at the point of which the failure occured, in a format similar to that of Android's tombstones. It currently has the following format:
Registers where the failure occurred (pc 0x0055555561b4):
x0 0000000000000014 x1 0000007ffffff6c0 x2 1100007ffffff6d0 x3 12000056ffffe025
x4 0000007fff800000 x5 0000000000000014 x6 0000007fff800000 x7 0000000000000001
x8 12000056ffffe020 x9 0200007700000000 x10 0200007700000000 x11 0000000000000000
x12 0000007fffffdde0 x13 0000000000000000 x14 02b65b01f7a97490 x15 0000000000000000
x16 0000007fb77376b8 x17 0000000000000012 x18 0000007fb7ed6000 x19 0000005555556078
x20 0000007ffffff768 x21 0000007ffffff778 x22 0000000000000001 x23 0000000000000000
x24 0000000000000000 x25 0000000000000000 x26 0000000000000000 x27 0000000000000000
x28 0000000000000000 x29 0000007ffffff6f0 x30 00000055555561b4
... and prints after the dump of memory tags around the buggy address.
Every register is saved exactly as it was at the point where the tag mismatch occurs, with the exception of x16/x17. These registers are used in the tag mismatch calculation as scratch registers during __hwasan_check, and cannot be saved without affecting the fast path. As these registers are designated as scratch registers for linking, there should be no important information in them that could aid in debugging.
Reviewers: pcc, eugenis
Reviewed By: pcc, eugenis
Subscribers: srhines, kubamracek, mgorny, javed.absar, krytarowski, kristof.beyls, hiraditya, jdoerfert, llvm-commits, #sanitizers
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D58857
Change-Id: I7efa8a42509e9e00ebdb5b6a0ddde8c6dc08ae7e
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@355738 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Implement rounding mode support for addxf3/subxf3.
On architectures that implemented the support, this will access the
corresponding floating point environment register to apply the correct
rounding. For other architectures, it will keep the current behaviour
and use IEEE-754 default rounding mode (to nearest, ties to even).
ARM32/AArch64 support implemented in this change. i386 and AMD64 will
be added in a follow up change.
Change-Id: Idd8044ffb121e82d1ec2160b11cfcf5b5805167d
|
|
Summary:
When symbols are unavailable, the current code prints
sp: ... pc: ... (null) (null)
instead of module name + offset.
Change the output to include module name and offset, and also to match
the regular sanitizer stack trace format so that it is recognized by
symbolize.py out of the box.
Reviewers: kcc, pcc
Subscribers: kubamracek, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D58267
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@354157 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Don't define vfork when OMPILER_RT_HWASAN_WITH_INTERCEPTORS=OFF.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@355165 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Remove the maximum stack cleanup size check. With ulimit -s unlimited
main thread stack can be very large, but we don't really have a choice
other than cleaning all of it. It should be reasonably fast - hwasan
cleans large shadow ranges with a single madvise call.
This change fixes check-hwasan after ulimit -s unlimited.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@355137 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
PLT calls on i386 expect GOT base address in %ebx.
This call does not need to go through PLT strictly speaking, but I'd
rather avoid future surprises and implement the most general case.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@355125 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@355064 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Disable hwasan interceptor on non-linux, non-x86-or-arm platforms.
Add @plt to the asm call that clang intergrated-as infers but gcc does
not.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@355041 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Intercept vfork on arm, aarch64, i386 and x86_64.
Reviewers: pcc, vitalybuka
Subscribers: kubamracek, mgorny, javed.absar, krytarowski, kristof.beyls, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D58533
Change-Id: I40a534cf1539f256bcba769360d0adf6ae16e3ab
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@355030 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@354632 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Bug: http://b/123257989
This reverts commit 70375fadea305578c21ccafd51af55032964788e. This
change has been unnecessary ever since r334144, where linking of libcxx
into libfuzzer was restricted to Linux and Fuchsia.
|
|
Change-Id: I8413b4a1839487444fc6255c61fff89c27303dae
|
|
Change-Id: I08740d76c18c91e87f643871953c6feae0081289
|
|
tsan: add fiber support
This patch adds functions for managing fibers:
__tsan_get_current_fiber()
__tsan_create_fiber()
__tsan_destroy_fiber()
__tsan_switch_to_fiber()
__tsan_set_fiber_name()
See the added tests for use examples.
Author: yuri (Yuri Per)
Reviewed in: https://reviews.llvm.org/D54889
[The previous commit of this change was reverted,
this is a resubmit with a squashed fix for check_analyze.sh
and COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED]
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353947 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This reverts commit r353820, to go with the revert of r353817.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353942 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This reverts commit r353817 because we think it broke AARch64 and
PowerPC buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353939 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This function doesn't use anything MSVC specific but works fine
for any _WIN32 target.
Differential Revision: https://reviews.llvm.org/D58106
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353918 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Dependencies like clang aren't available in the runtimes build, this
was accidentally omitted in D57992.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353914 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353910 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Many sanitizer_common tests (ASan, TSan) run with a "sanitized process
space" so we need to limit their parallism.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353909 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
RHDTS
Summary:
A link error was encountered when using the Red Hat Developer Toolset.
In the RHDTS, `libstdc++.so` is a linker script that may resolve symbols
to a static library. This patch places `-lstdc++` later in the ordering.
Reviewers: sfertile, nemanjai, tstellar, dberris
Reviewed By: dberris
Subscribers: dberris, mgorny, delcypher, jdoerfert, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D58144
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353905 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
buildgo.sh puts most of sanitizer_common together in a single source
file. These single-letter macros end up affecting a lot of unrelated
code; #undef them as early as possible.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353902 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353891 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Update numbers after 353817.
This was extensively benchmarked in https://reviews.llvm.org/D54889
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353820 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This patch adds functions for managing fibers:
__tsan_get_current_fiber()
__tsan_create_fiber()
__tsan_destroy_fiber()
__tsan_switch_to_fiber()
__tsan_set_fiber_name()
See the added tests for use examples.
Author: yuri (Yuri Per)
Reviewed in: https://reviews.llvm.org/D54889
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353817 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This change is preparation for fiber support.
Author: yuri (Yuri Per)
Reviewed in: https://reviews.llvm.org/D58104
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353805 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
When performing runtimes build, dependencies like clang and
clang-headers aren't available. This was accidentally omitted in D57992.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353796 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353794 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353792 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This avoids the unused function warning during compilation.
Differential Revision: https://reviews.llvm.org/D58082
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353787 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Otherwise this propagates all the way to CMake and results in an error
during configuration. We check and handle the result and report warning
separately so this is not changing the behavior.
Differential Revision: https://reviews.llvm.org/D58086
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353784 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
second attempt after failed r352732, this time with a fix for cmake
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353782 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
on broken debug info
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353781 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This test instruments the following code with coverage, runs the fuzzer
once, and asserts that there are uncovered PCs. The ARM64 backend
optimizes this code using the `csel` (Conditional select) instruction,
which removes all branching from the resulting machine code. The test
then fails because we do not have any uncovered PCs. The easiest
solution for now is to turn off optimization for the DSOs used in this
test.
```
int DSO1(int a) {
if (a < 123456)
return 0;
return 1;
}
```
rdar://47646400
Reviewers: kcc
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D58087
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353780 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353777 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
good enough for the first unit test
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353775 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353737 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This change is preparation for fiber support.
Author: yuri (Yuri Per)
Reviewed in: https://reviews.llvm.org/D57876
Context: https://reviews.llvm.org/D54889
llvm-svn: 353385
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353627 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353624 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353623 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353617 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Crashes PPC bot
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353604 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
We shouldn't be treating runtimes builds as standalone builds since
we have enough of the context loaded into the runtimes environment.
Differential Revision: https://reviews.llvm.org/D57992
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353601 91177308-0d34-0410-b5e6-96231b3b80d8
|