Age | Commit message (Collapse) | Author |
|
Summary:
As discussed in https://github.com/google/oss-fuzz/issues/933,
it would be really awesome to be able to use ThinLTO for fuzzing.
However, as @kcc has pointed out, it is currently undefined (untested)
whether the sanitizers actually function properly with LLD and/or LTO.
This patch is inspired by the cfi test, which already do test with LTO
(and/or LLD), since LTO is required for CFI to function.
I started with UBSan, because it's cmakelists / lit.* files appeared
to be the cleanest. This patch adds the infrastructure to easily add
LLD and/or LTO sub-variants of the existing lit test configurations.
Also, this patch adds the LLD flavor, that explicitly does use LLD to link.
The check-ubsan does pass on my machine. And to minimize the [initial]
potential buildbot breakage i have put some restrictions on this flavour.
Please review carefully, i have not worked with lit/sanitizer tests before.
The original attempt, r319525 was reverted in r319526 due
to the failures in compiler-rt standalone builds.
Reviewers: eugenis, vitalybuka
Reviewed By: eugenis
Subscribers: #sanitizers, pcc, kubamracek, mgorny, llvm-commits, mehdi_amini, inglorion, kcc
Differential Revision: https://reviews.llvm.org/D39508
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319575 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This reverts commit r319525.
This change has introduced a problem with the Lit tests build for compiler-rt using Gold: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/6047/steps/test%20standalone%20compiler-rt/logs/stdio
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm/utils/lit/lit/TestingConfig.py:101: fatal: unable to parse config file '/b/sanitizer-x86_64-linux/build/llvm/projects/compiler-rt/test/profile/Linux/lit.local.cfg', traceback: Traceback (most recent call last):
File "/b/sanitizer-x86_64-linux/build/llvm/utils/lit/lit/TestingConfig.py", line 88, in load_from_path
exec(compile(data, path, 'exec'), cfg_globals, None)
File "/b/sanitizer-x86_64-linux/build/llvm/projects/compiler-rt/test/profile/Linux/lit.local.cfg", line 37, in <module>
if root.host_os not in ['Linux'] or not is_gold_linker_available():
File "/b/sanitizer-x86_64-linux/build/llvm/projects/compiler-rt/test/profile/Linux/lit.local.cfg", line 27, in is_gold_linker_available
stderr = subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319529 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
As discussed in https://github.com/google/oss-fuzz/issues/933,
it would be really awesome to be able to use ThinLTO for fuzzing.
However, as @kcc has pointed out, it is currently undefined (untested)
whether the sanitizers actually function properly with LLD and/or LTO.
This patch is inspired by the cfi test, which already do test with LTO
(and/or LLD), since LTO is required for CFI to function.
I started with UBSan, because it's cmakelists / lit.* files appeared
to be the cleanest. This patch adds the infrastructure to easily add
LLD and/or LTO sub-variants of the existing lit test configurations.
Also, this patch adds the LLD flavor, that explicitly does use LLD to link.
The check-ubsan does pass on my machine. And to minimize the [initial]
potential buildbot breakage i have put some restrictions on this flavour.
Please review carefully, i have not worked with lit/sanitizer tests before.
Reviewers: eugenis, vitalybuka
Reviewed By: eugenis
Subscribers: #sanitizers, pcc, kubamracek, mgorny, llvm-commits, mehdi_amini, inglorion, kcc
Differential Revision: https://reviews.llvm.org/D39508
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319525 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
PDB emission now works well enough that we can rely on it for these
tests to pass.
Differential Revision: https://reviews.llvm.org/D40188
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318546 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: vitalybuka, pcc
Subscribers: llvm-commits, srhines
Differential Revision: https://reviews.llvm.org/D38911
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315922 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315775 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
not assumed not to alias.
It is possible for both a base and a derived class to be satisfied
with a unique vtable. If a program contains casts of the same pointer
to both of those types, the CFI checks will be lowered to this
(with ThinLTO):
if (p != &__typeid_base_global_addr)
trap();
if (p != &__typeid_derived_global_addr)
trap();
The optimizer may then use the first condition combined
with the assumption that __typeid_base_global_addr and
__typeid_derived_global_addr may not alias to optimize away the second
comparison, resulting in an unconditional trap.
This patch fixes the bug by giving imported globals the type [0 x i8]*,
which prevents the optimizer from assuming that they do not alias.
Differential Revision: https://reviews.llvm.org/D38873
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315753 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Enable check-cfi and check-ubsan on Android.
Check-ubsan includes standalone and ubsan+asan, but not tsan or msan.
Cross-dso cfi tests are disabled for now.
Reviewers: vitalybuka, pcc
Subscribers: srhines, kubamracek, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D38608
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315105 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
bin/ld.lld: error: ubsan_handlers.cc:(.debug_info+0x80D5D): has non-ABS reloc
Bug pending.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315027 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: vitalybuka
Subscribers: kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D38527
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315010 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315007 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Run CFI tests on all targets current toolchain can target.
On multiarch Linux, this will run all CFI tests with -m32 and -m64.
Reviewers: pcc
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D38572
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315001 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: pcc, krasin, eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D38412
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314659 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This was originally broken by r258744 which introduced a weak reference
from ubsan to ubsan_cxx. This reference does not work directly on
Windows because COFF has no direct concept of weak symbols. The fix is
to use /alternatename to create a weak external reference to ubsan_cxx.
Also fix the definition (and the name, so that we drop cached values)
of the cmake flag that controls whether to build ubsan_cxx. Now the
user-controllable flag is always on, and we turn it off internally
depending on whether we support building it.
Differential Revision: https://reviews.llvm.org/D37882
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313391 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
We now avoid using absolute symbols on Windows (D37407 and D37408),
so this should work.
Fixes PR32770.
Differential Revision: https://reviews.llvm.org/D37883
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313379 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: https://reviews.llvm.org/D35101
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311745 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306955 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@305534 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301257 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
PR32770.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301235 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
These were added in r301016, but they're failing, because
-fsanitize=cfi seemingly causes -flto=thin to emit raw bitcode objects,
rather than the mach-o-wrapped bitcode we emit with -flto=thin alone.
That causes all tests to fail with ld64 errors.
Filed PR32741.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301065 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Apparently, elif() is deprecated.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301022 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Run tests in all configurations:
(standalone, with devirtualization) * (gold, lld) * (lto, thinlto)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301016 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This is necessary to run the test suite in ThinLTO mode - otherwise
opt complains about an input file containing several modules.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300901 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The test is using indirect calls.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300900 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Only depend on LLD if it is going to be built.
Re-land of r298174 which got reverted in r298287.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298753 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Fixes cfi/stats.cpp and asan/fuse-lld.cc on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298545 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298476 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Revert "Fix sanitizer tests with LLVM_TOOL_LLD_BUILD=OFF."
Revert "[asan] Remove gc-sections test with bfd."
Revert "[asan] Disable globals-gc test with ld.bfd."
Revert "[asan] Fix dead stripping of globals on Linux (compiler-rt)"
OOM in gold linker.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298287 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Only depend on LLD if it is going to be built.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298174 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
It appears that the fix only helped Itanium ABI.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297775 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
https://reviews.llvm.org/D30716
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297771 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This allows them to be run on other platforms, undoing damage from
r286902.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@286904 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
These tests need to be marked as unsupported on Darwin:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/1545
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@286902 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@286637 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@286612 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: https://reviews.llvm.org/D24817
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@282189 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The sanitizer-windows bot is currently red because this test unexpectedly passes.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@282095 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@282018 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
dwarf again
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280422 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280106 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: Add a test case for __attribute__((no_sanitize("cfi"))) being effective.
Reviewers: kcc
Subscribers: dberris
Differential Revision: https://reviews.llvm.org/D23425
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278530 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: kcc
Differential Revision: https://reviews.llvm.org/D23190
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277798 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Often, a code will call multiple virtual methods of a given object.
If they go in a linear block, it should be possible to check vtable
before the first call, then store vtable pointer and reuse it for
the second vcall without any additional checks.
This is expected to have a positive performance impact on a hot
path in Blink, see https://crbug.com/634139.
Reviewers: kcc
Differential Revision: https://reviews.llvm.org/D23151
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277795 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
-lowertypetests-bitsets-level controls which kinds of bitsets
are generated, as introduced in r277556. This change adds tests
to compiler-rt.
Reviewers: kcc
Differential Revision: https://reviews.llvm.org/D23103
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277632 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This patch is a refactoring of the way cmake 'targets' are grouped.
It won't affect non-UI cmake-generators.
Clang/LLVM are using a structured way to group targets which ease
navigation through Visual Studio UI. The Compiler-RT projects
differ from the way Clang/LLVM are grouping targets.
This patch doesn't contain behavior changes.
Reviewers: kubabrecka, rnk
Subscribers: wang0109, llvm-commits, kubabrecka, chrisha
Differential Revision: http://reviews.llvm.org/D21952
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275111 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D21123
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273758 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D21055
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273731 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D18813
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267902 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
At the moment almost every lit.site.cfg.in contains two lines comment:
## Autogenerated by LLVM/Clang configuration.
# Do not edit!
The patch adds variable LIT_SITE_CFG_IN_HEADER, that is replaced from
configure_lit_site_cfg with the note and some useful information.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266520 91177308-0d34-0410-b5e6-96231b3b80d8
|