diff options
author | Manoj Gupta <manojgupta@google.com> | 2019-10-11 10:49:21 -0700 |
---|---|---|
committer | Manoj Gupta <manojgupta@chromium.org> | 2019-10-11 18:57:34 +0000 |
commit | c08e01d98e72f2e9dffd73a7fd3d011f2a251ac9 (patch) | |
tree | 955fd03ab874fd6b735a3d309d031afefd5723a0 /compiler_wrapper/testdata | |
parent | 6ecb3475254b6ab7ab3be6a2f58abc2f2fdd3da8 (diff) | |
download | toolchain-utils-c08e01d98e72f2e9dffd73a7fd3d011f2a251ac9.tar.gz |
compiler_wrapper: Disable new pass manager with sanitizers+coverage.
Useing sanitizers and coverage together in new pass manager
causes clang to crash.
Avoid the crash by disabling new pass manager in these cases.
BUG=chromium:1013622
TEST=go test
Change-Id: Ifc787e9f288891e3e1b68c791f0ddaa508d8c816
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1856379
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'compiler_wrapper/testdata')
5 files changed, 593 insertions, 0 deletions
diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json index 7e7e54c0..be1a2922 100644 --- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json @@ -163,5 +163,104 @@ } } ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-clang", + "args": [ + "-fsanitize=address", + "-fprofile-instr-generate", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/tmp/stable/clang", + "args": [ + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-fuse-ld=lld", + "-Wno-unused-local-typedefs", + "-Wno-deprecated-declarations", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-fno-experimental-new-pass-manager", + "-fsanitize=address", + "-fprofile-instr-generate", + "main.cc" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-clang", + "args": [ + "-fsanitize=address", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/tmp/stable/clang", + "args": [ + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-fuse-ld=lld", + "-Wno-unused-local-typedefs", + "-Wno-deprecated-declarations", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-fsanitize=address", + "main.cc" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-clang", + "args": [ + "-fprofile-instr-generate", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/tmp/stable/clang", + "args": [ + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-fuse-ld=lld", + "-Wno-unused-local-typedefs", + "-Wno-deprecated-declarations", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-fprofile-instr-generate", + "main.cc" + ] + } + } + ] } ] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json index 9fa1f4f2..39094948 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json @@ -238,5 +238,150 @@ } } ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-clang", + "args": [ + "-fsanitize=address", + "-fprofile-instr-generate", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "../../usr/bin/clang", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fuse-ld=lld", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-fno-omit-frame-pointer", + "-fno-experimental-new-pass-manager", + "-fsanitize=address", + "-fprofile-instr-generate", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ], + "env_updates": [ + "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002", + "CCACHE_CPP2=yes" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-clang", + "args": [ + "-fsanitize=address", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "../../usr/bin/clang", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fuse-ld=lld", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-fno-omit-frame-pointer", + "-fsanitize=address", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ], + "env_updates": [ + "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002", + "CCACHE_CPP2=yes" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-clang", + "args": [ + "-fprofile-instr-generate", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "../../usr/bin/clang", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fuse-ld=lld", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "-fprofile-instr-generate", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ], + "env_updates": [ + "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002", + "CCACHE_CPP2=yes" + ] + } + } + ] } ] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_sanitizer_args.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_sanitizer_args.json index bddac1d2..a63aa25c 100644 --- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_hardened_golden/gcc_sanitizer_args.json @@ -197,5 +197,124 @@ } } ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-gcc", + "args": [ + "-fsanitize=address", + "-fprofile-instr-generate", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "./x86_64-cros-linux-gnu-gcc.real", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-fno-reorder-blocks-and-partition", + "-Wno-unused-local-typedefs", + "-Wno-maybe-uninitialized", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "-fsanitize=address", + "-fprofile-instr-generate", + "main.cc", + "-mno-movbe" + ], + "env_updates": [ + "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-gcc", + "args": [ + "-fsanitize=address", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "./x86_64-cros-linux-gnu-gcc.real", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-fno-reorder-blocks-and-partition", + "-Wno-unused-local-typedefs", + "-Wno-maybe-uninitialized", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "-fsanitize=address", + "main.cc", + "-mno-movbe" + ], + "env_updates": [ + "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-gcc", + "args": [ + "-fprofile-instr-generate", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "./x86_64-cros-linux-gnu-gcc.real", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-fno-reorder-blocks-and-partition", + "-Wno-unused-local-typedefs", + "-Wno-maybe-uninitialized", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "-fprofile-instr-generate", + "main.cc", + "-mno-movbe" + ], + "env_updates": [ + "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002" + ] + } + } + ] } ] diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json index 05209ee3..386e82d6 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json @@ -203,5 +203,128 @@ } } ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-clang", + "args": [ + "-fsanitize=address", + "-fprofile-instr-generate", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "../../usr/bin/clang", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fno-experimental-new-pass-manager", + "-fsanitize=address", + "-fprofile-instr-generate", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ], + "env_updates": [ + "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002", + "CCACHE_CPP2=yes" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-clang", + "args": [ + "-fsanitize=address", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "../../usr/bin/clang", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fsanitize=address", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ], + "env_updates": [ + "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002", + "CCACHE_CPP2=yes" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-clang", + "args": [ + "-fprofile-instr-generate", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "../../usr/bin/clang", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fprofile-instr-generate", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ], + "env_updates": [ + "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002", + "CCACHE_CPP2=yes" + ] + } + } + ] } ] diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_sanitizer_args.json b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_sanitizer_args.json index 639dc524..7091f608 100644 --- a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_sanitizer_args.json +++ b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_sanitizer_args.json @@ -177,5 +177,112 @@ } } ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-gcc", + "args": [ + "-fsanitize=address", + "-fprofile-instr-generate", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "./x86_64-cros-linux-gnu-gcc.real", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Wno-maybe-uninitialized", + "-Wno-unused-local-typedefs", + "-Wno-deprecated-declarations", + "-Wtrampolines", + "-fsanitize=address", + "-fprofile-instr-generate", + "main.cc", + "-mno-movbe" + ], + "env_updates": [ + "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-gcc", + "args": [ + "-fsanitize=address", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "./x86_64-cros-linux-gnu-gcc.real", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Wno-maybe-uninitialized", + "-Wno-unused-local-typedefs", + "-Wno-deprecated-declarations", + "-Wtrampolines", + "-fsanitize=address", + "main.cc", + "-mno-movbe" + ], + "env_updates": [ + "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-gcc", + "args": [ + "-fprofile-instr-generate", + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/usr/bin/ccache", + "args": [ + "./x86_64-cros-linux-gnu-gcc.real", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Wno-maybe-uninitialized", + "-Wno-unused-local-typedefs", + "-Wno-deprecated-declarations", + "-Wtrampolines", + "-fprofile-instr-generate", + "main.cc", + "-mno-movbe" + ], + "env_updates": [ + "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", + "CCACHE_DIR=/var/cache/distfiles/ccache", + "CCACHE_UMASK=002" + ] + } + } + ] } ] |