Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address Sanitizer support in CoreCLR #74623

Merged
merged 59 commits into from
Jul 18, 2023
Merged

Conversation

jkoritzinsky
Copy link
Member

@jkoritzinsky jkoritzinsky commented Aug 26, 2022

Add ASAN-based testing to the runtime-sanitized pipeline for non-Windows platforms, and add some infrastructure for Windows-based runs.

This will help us catch the various kinds of bugs that AddressSanitizer can detect and keeps us ahead of the curve for any SDL requirements to use ASAN. We only enable ASAN legs for Linux_x64 and macOS x64 as the non-Intel platforms are "not supported" by LLVM (though the MacOS ARM64 platform can likely be added in the future). We don't add Windows legs as we're waiting on fixes in VS that will take a few months to get to a public release.

To build anything (except Mono) in this repo with AddressSanitizer enabled, you can add the -fsanitize address argument to any of our build entry-point scripts (./build.cmd/sh, ./src/coreclr/build-runtime.cmd/sh, or src/tests/build.cmd/sh).

We should determine a schedule to run the runtime-sanitized pipeline on to ensure we get regular ASAN coverage, probably once a week is good.

@jkoritzinsky jkoritzinsky added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it tenet-reliability Reliability/stability related issue (stress, load problems, etc.) area-Infrastructure labels Aug 26, 2022
@ghost ghost assigned jkoritzinsky Aug 26, 2022
@ghost
Copy link

ghost commented Aug 26, 2022

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Issue Details

This is a PR to see what failures we get from enabling ASAN in our native builds.

Now that we've solved the issues around exception handling and are getting some test suites to pass, it's worth taking a swing at the CI system again to see what failures we hit now.

Author: jkoritzinsky
Assignees: -
Labels:

NO-MERGE, NO-REVIEW, tenet-reliability, area-Infrastructure

Milestone: -

src/coreclr/nativeaot/Bootstrap/main.cpp Outdated Show resolved Hide resolved
src/coreclr/nativeaot/Bootstrap/main.cpp Outdated Show resolved Hide resolved
jkoritzinsky added a commit that referenced this pull request Jan 5, 2023
…the runtime with native sanitizers enabled.

Add a basic template for the YAML so we can at least get the pipeline created. I'll get the pipeline working in #74623
@jkoritzinsky

This comment was marked as outdated.

@azure-pipelines

This comment was marked as outdated.

Copy link
Member

@davidwrighton davidwrighton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed this offline with @jkoritzinsky and after the most recent set of changes, it looks good to me.

Copy link
Member

@am11 am11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

eng/native/configurecompiler.cmake Outdated Show resolved Hide resolved
@jkoritzinsky
Copy link
Member Author

Official build at https://dev.azure.com/dnceng/internal/_build/results?buildId=2222303&view=results
I'll hold off running the runtime-sanitized pipeline until #88928 is merged.

@jkoritzinsky
Copy link
Member Author

/azp run runtime-sanitized

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky
Copy link
Member Author

/azp run runtime-sanitized

@azure-pipelines
Copy link

No commit pushedDate could be found for PR 74623 in repo dotnet/runtime

@jkoritzinsky
Copy link
Member Author

/azp run runtime-sanitized

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky
Copy link
Member Author

/azp run runtime-sanitized

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky
Copy link
Member Author

Failures are unrelated. Merging in (finally)!!!

@jkoritzinsky jkoritzinsky merged commit 2811e7c into dotnet:main Jul 18, 2023
181 of 186 checks passed
@jkoritzinsky jkoritzinsky deleted the asan branch July 18, 2023 03:32
MichalStrehovsky added a commit to MichalStrehovsky/runtime that referenced this pull request Jul 19, 2023
MichalStrehovsky added a commit that referenced this pull request Jul 19, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure tenet-reliability Reliability/stability related issue (stress, load problems, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants