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

compiletest: Add directives to detect sanitizer support #73044

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

tmiasko
Copy link
Contributor

@tmiasko tmiasko commented Jun 5, 2020

Add needs-sanitizer-{address,leak,memory,thread} directive indicating
that test requires target with support for specific sanitizer.

This is an addition to the existing needs-sanitizer-support directive
indicating that test requires a sanitizer runtime library.

The existing needs-sanitizer-support directive could be incorporated into the
new ones, but I decided to retain it, since it enables running sanitizer
codegen tests even when building of sanitizer runtime libraries is disabled.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 5, 2020
@nikomatsakis
Copy link
Contributor

This is great. It'd be nice to see it documented in rustc-dev-guide, but the documentation there seems sufficiently sparse that it's not obvious where you would add it. I'm going to r+ but if you want to go and update the rustc-dev-guide coverage of these sorts of flags, it would be a heroic action on your part, @tmiasko =)

@bors r+

@bors
Copy link
Contributor

bors commented Jun 8, 2020

📌 Commit bae11ff has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 8, 2020
@tmiasko
Copy link
Contributor Author

tmiasko commented Jun 10, 2020

Updated annotations in two tests missed previously src/test/ui/sanitize/{leak,memory}.rs.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jun 11, 2020

📌 Commit 975f7df has been approved by nikomatsakis

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Jun 13, 2020
…akis

compiletest: Add directives to detect sanitizer support

Add needs-sanitizer-{address,leak,memory,thread} directive indicating
that test requires target with support for specific sanitizer.

This is an addition to the existing needs-sanitizer-support directive
indicating that test requires a sanitizer runtime library.

The existing needs-sanitizer-support directive could be incorporated into the
new ones, but I decided to retain it, since it enables running sanitizer
codegen tests even when building of sanitizer runtime libraries is disabled.
RalfJung added a commit to RalfJung/rust that referenced this pull request Jun 13, 2020
…akis

compiletest: Add directives to detect sanitizer support

Add needs-sanitizer-{address,leak,memory,thread} directive indicating
that test requires target with support for specific sanitizer.

This is an addition to the existing needs-sanitizer-support directive
indicating that test requires a sanitizer runtime library.

The existing needs-sanitizer-support directive could be incorporated into the
new ones, but I decided to retain it, since it enables running sanitizer
codegen tests even when building of sanitizer runtime libraries is disabled.
RalfJung added a commit to RalfJung/rust that referenced this pull request Jun 13, 2020
…akis

compiletest: Add directives to detect sanitizer support

Add needs-sanitizer-{address,leak,memory,thread} directive indicating
that test requires target with support for specific sanitizer.

This is an addition to the existing needs-sanitizer-support directive
indicating that test requires a sanitizer runtime library.

The existing needs-sanitizer-support directive could be incorporated into the
new ones, but I decided to retain it, since it enables running sanitizer
codegen tests even when building of sanitizer runtime libraries is disabled.
RalfJung added a commit to RalfJung/rust that referenced this pull request Jun 13, 2020
…akis

compiletest: Add directives to detect sanitizer support

Add needs-sanitizer-{address,leak,memory,thread} directive indicating
that test requires target with support for specific sanitizer.

This is an addition to the existing needs-sanitizer-support directive
indicating that test requires a sanitizer runtime library.

The existing needs-sanitizer-support directive could be incorporated into the
new ones, but I decided to retain it, since it enables running sanitizer
codegen tests even when building of sanitizer runtime libraries is disabled.
@tmiasko
Copy link
Contributor Author

tmiasko commented Jun 13, 2020

Failed on x86_64-apple-darwin in rollup #73299
[run-make] run-make-fulldeps/sanitizer-cdylib-link
[run-make] run-make-fulldeps/sanitizer-dylib-link

error: linking with `cc` failed: exit code: 1 ...

@RalfJung
Copy link
Member

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 13, 2020
Add needs-sanitizer-{address,leak,memory,thread} directive indicating
that test requires target with support for specific sanitizer.

This is an addition to the existing needs-sanitizer-support directive
indicating that test requires a sanitizer runtime library.
@tmiasko
Copy link
Contributor Author

tmiasko commented Jun 13, 2020

Retained only-linux annotations on sanitizer-*-link tests, since they don't work on macOS.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jun 15, 2020

📌 Commit d40e624 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 15, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 19, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#72280 (Fix up autoderef when reborrowing)
 - rust-lang#72785 (linker: MSVC supports linking static libraries as a whole archive)
 - rust-lang#73011 (first stage of implementing LLVM code coverage)
 - rust-lang#73044 (compiletest: Add directives to detect sanitizer support)
 - rust-lang#73054 (memory access sanity checks: abort instead of panic)
 - rust-lang#73136 (Change how compiler-builtins gets many CGUs)
 - rust-lang#73280 (Add E0763)
 - rust-lang#73317 (bootstrap: read config from $RUST_BOOTSTRAP_CONFIG)
 - rust-lang#73350 (bootstrap/install.rs: support a nonexistent `prefix` in `x.py install`)
 - rust-lang#73352 (Speed up bootstrap a little.)

Failed merges:

r? @ghost
@bors bors merged commit 0851036 into rust-lang:master Jun 19, 2020
@tmiasko tmiasko deleted the compiletest-san branch July 1, 2020 13:47
@cuviper cuviper added this to the 1.46 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants