-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address Sanitizer support in CoreCLR (#74623)
* Enable AddressSanitizer in CoreCLR, Libs, and Host and update runtime-sanitized to run tests with ASAN on Linux and Mac * Unify on HAS_ADDRESS_SANITIZER define name Centralize setting up sanitizer flags. Remove last usage of CLR_CMAKE_ENABLE_ASAN outside of eng/native Remove unnecessary diffs Use the cpuid intrinsic and enable ASAN on InitJitHelpers1. Add comments for the places where we have ASAN disabled Undo changes to src/coreclr/jit/CMakeLists.txt Add docs and fix the docs in the build script. Add docs for the SkipVCEnvInit hook * Remove CRT runtime changes. We won't need this when we finally onboard to Windows with some changes they have coming down the pipeline, so remove them for now to reduce the diff of this PR. * Remove suppression now that we've fixed the underlying issue. * Remove some Windows-only sanitizer CMake that we won't need when ASAN is ready for us to consume on Windows. * Set schedule for runtime-sanitized pipeline * Remove workaround in JIT memory set/copy helpers now that the JIT bug has been fixed. * Add missing helix queues setup template. * Fix missing command to build nativeaot runtime tests as nativeaot. * Add a scenario name to trigger the extended timeout in the libraries test helix configuration. * Remove extraneous whitespace. * Fix using the cross-targetting ILC when sanitizers are enabled. Also pass through our TargetOS and TargetArchitecture variables to the publish command for our native sanitizers targets to correctly do their extra logic. * Disable LSAN on the CustomMain test. * Disable some tests on sanitized runtimes. * Copy the sanitizer runtime for OSX NativeAOT runtime tests. * A little cleanup to try to get the build right now that we are always doing cross-builds on Linux. * Fix crossgen-corelib.proj syntax. * Fix cross-os dac builds to not include the host architecture in the output path. * Split the debugger components into a separate component and make the "unsanitized cross components" build into an "unsanitized debugger components" build as it can't be part of the regular cross-components build * Always write out the host-arch path on Windows and update the cross-dac build script to expect that. * Change to use the dynamic runtime on Windows, as ASAN in VS is moving to a dynamic-only model. * Update docker images to include the sanitizer runtimes in the crossrootfs images. * Fix explicit image tags * The unsanitized build should be of the target architecture, not the host architecture. As a result, we still need a cross-arch build for the cross-arch use cases when sanitized, as well as an unsanitized target arch build for the debugger tools. * Turn off using the sigaltstack for NativeAOT tests that don't use the asansupport.cpp default options * Make sure the shared ASAN runtime is present for the nativeaot/SmokeTests/SharedLibrary test. * Disable crossgen2 tests with sanitizers as they don't get us interesting coverage. * Fix custom default options and disable some more crossgen2-based tests. * Simplify lookup of asan runtime on mac and fix copying the shared runtime for the SharedLibrary NativeAOT test. * Disable test that's failing for weird reasons. * Fix one more alloc-dealloc mismatch that only started to show up after test merging increased allocations in the runtime * Disable the System.Text.Json test suite on sanitized builds as it causes SO failures on Mac * Fix test exclusion * PR feedback. * Fix mac build * Do review changes * Add libbootstrapper object files to the platform manifest now that NativeAOT has * Disable tests that check size on sanitized builds * Use the built-in `include_guard` option * Disable use-after-return checking in ASAN. CoreCLR doesn't do well with parallel stacks. * Only pass the no UAR flag on C and CXX with Clang (not AppleClang).
- Loading branch information
1 parent
a654a77
commit 2811e7c
Showing
108 changed files
with
938 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.