diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2019-08-26 21:44:55 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2019-08-26 21:44:55 +0000 |
commit | 9497fffe80dde06c27f345b67f6b411429820287 (patch) | |
tree | e5c98ec92d307854219f447098fd60c3cfa40f96 /test/hwasan | |
parent | 81b01554469c145e4731759e101b17cbb893d803 (diff) | |
download | compiler-rt-9497fffe80dde06c27f345b67f6b411429820287.tar.gz |
[hwasan] Fix test failure in r369721.
Try harder to emulate "old runtime" in the test.
To get the old behavior with the new runtime library, we need both
disable personality function wrapping and enable landing pad
instrumentation.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@369977 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/hwasan')
-rw-r--r-- | test/hwasan/lit.cfg.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/hwasan/lit.cfg.py b/test/hwasan/lit.cfg.py index d2e71ba6d..eead83219 100644 --- a/test/hwasan/lit.cfg.py +++ b/test/hwasan/lit.cfg.py @@ -11,15 +11,18 @@ config.test_source_root = os.path.dirname(__file__) # Setup default compiler flags used with -fsanitize=memory option. clang_cflags = [config.target_cflags] + config.debug_info_flags clang_cxxflags = config.cxx_mode_flags + clang_cflags -clang_hwasan_oldrt_cflags = clang_cflags + ["-fsanitize=hwaddress", "-fuse-ld=lld"] +clang_hwasan_common_cflags = clang_cflags + ["-fsanitize=hwaddress", "-fuse-ld=lld"] if config.target_arch == 'x86_64': # This does basically the same thing as tagged-globals on aarch64. Because # the x86_64 implementation is for testing purposes only there is no # equivalent target feature implemented on x86_64. - clang_hwasan_oldrt_cflags += ["-mcmodel=large"] -clang_hwasan_cflags = clang_hwasan_oldrt_cflags + ["-mllvm", "-hwasan-globals", + clang_hwasan_common_cflags += ["-mcmodel=large"] +clang_hwasan_cflags = clang_hwasan_common_cflags + ["-mllvm", "-hwasan-globals", "-mllvm", "-hwasan-instrument-landing-pads=0", "-mllvm", "-hwasan-instrument-personality-functions"] +clang_hwasan_oldrt_cflags = clang_hwasan_common_cflags + ["-mllvm", "-hwasan-instrument-landing-pads=1", + "-mllvm", "-hwasan-instrument-personality-functions=0"] + clang_hwasan_cxxflags = config.cxx_mode_flags + clang_hwasan_cflags clang_hwasan_oldrt_cxxflags = config.cxx_mode_flags + clang_hwasan_oldrt_cflags |