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

Enable leak sanitizer test case #68244

Merged
merged 1 commit into from
Jan 16, 2020
Merged

Enable leak sanitizer test case #68244

merged 1 commit into from
Jan 16, 2020

Conversation

tmiasko
Copy link
Contributor

@tmiasko tmiasko commented Jan 15, 2020

  • Use black_box to avoid memory leak removal during optimization.
  • Leak multiple objects to make test case more robust.

@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 @alexcrichton (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 Jan 15, 2020
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 15, 2020

📌 Commit 8b341e4c539d4876fd34a303ee175189f114248b has been approved by alexcrichton

@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 Jan 15, 2020
@Centril
Copy link
Contributor

Centril commented Jan 15, 2020

So I think we might reach the conclusion that because this is 1) in our own test suite under our control and 2) compiled with a toolchain we also fully control, that relying on this might be OK for internal purposes. That said, we currently state that:

Note however, that black_box is only (and can only be) provided on a "best-effort" basis. The extent to which it can block optimisations may vary depending upon the platform and code-gen backend used. Programs cannot rely on black_box for correctness in any way.

So I would like to hear from more folks first (such as e.g. @rkruppe and @RalfJung) to develop a common understanding of our policy here.

For now I will temporarily @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 Jan 15, 2020
@alexcrichton
Copy link
Member

This is fixing a test and I don't want to deal with policies of using black_box, so

r? @Centril

* Use `black_box` to avoid memory leak removal during optimization.
* Leak multiple objects to make test case more robust.
@Centril
Copy link
Contributor

Centril commented Jan 16, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Jan 16, 2020

📌 Commit 5d00b5c has been approved by Centril

@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 Jan 16, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Jan 16, 2020
Enable leak sanitizer test case

* Use `black_box` to avoid memory leak removal during optimization.
* Leak multiple objects to make test case more robust.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Jan 16, 2020
Enable leak sanitizer test case

* Use `black_box` to avoid memory leak removal during optimization.
* Leak multiple objects to make test case more robust.
bors added a commit that referenced this pull request Jan 16, 2020
Rollup of 5 pull requests

Successful merges:

 - #68033 (Don't use f64 shims for f32 cmath functions on non 32-bit x86 MSVC)
 - #68244 (Enable leak sanitizer test case)
 - #68255 (Remove unused auxiliary file that was replaced with rust_test_helpers)
 - #68263 (rustdoc: HTML escape codeblocks which fail syntax highlighting)
 - #68274 (remove dead code)

Failed merges:

r? @ghost
@bors bors merged commit 5d00b5c into rust-lang:master Jan 16, 2020
@tmiasko tmiasko deleted the leak branch January 16, 2020 21:26
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.

6 participants