This repository was archived by the owner on Jan 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +29
-7
lines changed Expand file tree Collapse file tree 4 files changed +29
-7
lines changed Original file line number Diff line number Diff line change 66# TODO: `ASAN_OPTIONS=check_initialization_order=1` (https://clang.llvm.org/docs/AddressSanitizer.html#initialization-order-checking).
77# TODO: macOS: `ASAN_OPTIONS=detect_leaks=1` (https://clang.llvm.org/docs/AddressSanitizer.html#memory-leak-detection).
88
9+ $env: ASAN_OPTIONS = " check_initialization_order=true:detect_stack_use_after_return=true:print_stats=true:" `
10+ + " alloc_dealloc_mismatch=true:new_delete_type_mismatch=true:strict_init_order=true:strict_string_checks=true:" `
11+ + " detect_invalid_pointer_pairs=2:detect_invalid_pointer_pairs=2"
12+
913if (-not (Test-CTest (Join-Path $PSScriptRoot bin $Env: BUILD_CONFIGURATION unittests) " QIR Runtime" )) {
1014 throw " At least one project failed testing. Check the logs."
1115}
Original file line number Diff line number Diff line change 55
66# TODO: `ASAN_OPTIONS=check_initialization_order=1` (https://clang.llvm.org/docs/AddressSanitizer.html#initialization-order-checking).
77# TODO: macOS: `ASAN_OPTIONS=detect_leaks=1` (https://clang.llvm.org/docs/AddressSanitizer.html#memory-leak-detection).
8+ $env: ASAN_OPTIONS = " check_initialization_order=true:detect_stack_use_after_return=true:print_stats=true:" `
9+ + " alloc_dealloc_mismatch=true:new_delete_type_mismatch=true:strict_init_order=true:strict_string_checks=true:" `
10+ + " detect_invalid_pointer_pairs=2:detect_invalid_pointer_pairs=2"
811
912if (-not (Test-CTest (Join-Path $PSScriptRoot bin $Env: BUILD_CONFIGURATION StandaloneInputReference) " QIR Samples (StandaloneInputReference)" )) {
1013 throw " At least one project failed testing. Check the logs."
Original file line number Diff line number Diff line change @@ -16,14 +16,17 @@ if ($Env:BUILD_CONFIGURATION -eq "Debug")
1616 if (-not ($IsWindows ))
1717 {
1818 $env: LSAN_OPTIONS += " suppressions=../../../../LSan.ignore" # https://clang.llvm.org/docs/AddressSanitizer.html#suppressing-memory-leaks
19- if (-not ($IsMacOS ))
20- {
21- $env: ASAN_OPTIONS += " check_initialization_order=1" # https://clang.llvm.org/docs/AddressSanitizer.html#initialization-order-checking
22- }
19+ # if (-not ($IsMacOS))
20+ # {
21+ # $env:ASAN_OPTIONS += "check_initialization_order=1" # https://clang.llvm.org/docs/AddressSanitizer.html#initialization-order-checking
22+ # }
2323 # else # AddressSanitizer: detect_leaks is not supported on this platform. Re-enable this once supported.
2424 # {
2525 # $env:ASAN_OPTIONS += "detect_leaks=1" # https://clang.llvm.org/docs/AddressSanitizer.html#memory-leak-detection
2626 # }
27+ $env: ASAN_OPTIONS = " check_initialization_order=true:detect_stack_use_after_return=true:print_stats=true:" `
28+ + " alloc_dealloc_mismatch=true:new_delete_type_mismatch=true:strict_init_order=true:strict_string_checks=true:" `
29+ + " detect_invalid_pointer_pairs=2:detect_invalid_pointer_pairs=2"
2730 }
2831}
2932
Original file line number Diff line number Diff line change @@ -10,11 +10,23 @@ if (-not (Test-Path $nativeBuild)) {
1010}
1111Push-Location $nativeBuild
1212
13- $SANITIZE_FLAGS = " -fsanitize=undefined " `
13+ $SANITIZE_FLAGS = `
14+ " -fsanitize=undefined " `
15+ + " -fsanitize=shift -fsanitize=shift-base " `
16+ + " -fsanitize=integer-divide-by-zero -fsanitize=float-divide-by-zero " `
17+ + " -fsanitize=unreachable " `
18+ + " -fsanitize=vla-bound -fsanitize=null -fsanitize=return " `
19+ + " -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=bounds-strict -fsanitize=alignment -fsanitize=object-size " `
20+ + " -fsanitize=float-cast-overflow -fsanitize=nonnull-attribute -fsanitize=returns-nonnull-attribute -fsanitize=bool -fsanitize=enum " `
21+ + " -fsanitize=vptr -fsanitize=pointer-overflow -fsanitize=builtin " `
22+ + " -fsanitize=implicit-conversion -fsanitize=local-bounds -fsanitize=nullability " `
23+ `
1424 + " -fsanitize=address " `
25+ + " -fsanitize=pointer-compare -fsanitize=pointer-subtract " `
26+ + " -fsanitize-address-use-after-scope " `
1527 + " -fno-omit-frame-pointer -fno-optimize-sibling-calls"
16- # + "-fsanitize=float-divide-by-zero "
17- # + "-fsanitize=unsigned-integer-overflow -fsanitize=implicit-conversion -fsanitize=local-bounds -fsanitize=nullability "
28+
29+ # + "-fsanitize=unsigned-integer-overflow "
1830
1931# There should be no space after -D CMAKE_BUILD_TYPE= but if we provide the environment variable inline, without
2032# the space it doesn't seem to get substituted... With invalid -D CMAKE_BUILD_TYPE argument cmake silently produces
You can’t perform that action at this time.
0 commit comments