forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#68286 - Dylan-DPC:rollup-x7ssgov, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - rust-lang#68033 (Don't use f64 shims for f32 cmath functions on non 32-bit x86 MSVC) - rust-lang#68244 (Enable leak sanitizer test case) - rust-lang#68255 (Remove unused auxiliary file that was replaced with rust_test_helpers) - rust-lang#68263 (rustdoc: HTML escape codeblocks which fail syntax highlighting) - rust-lang#68274 (remove dead code) Failed merges: r? @ghost
- Loading branch information
Showing
8 changed files
with
38 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
-include ../tools.mk | ||
|
||
# needs-sanitizer-support | ||
# only-linux | ||
# only-x86_64 | ||
# ignore-test | ||
# FIXME(#46126) ThinLTO for libstd broke this test | ||
|
||
all: | ||
$(RUSTC) -C opt-level=1 -g -Z sanitizer=leak -Z print-link-args leak.rs | $(CGREP) rustc_rt.lsan | ||
$(RUSTC) -O -Z sanitizer=leak -Z print-link-args leak.rs | $(CGREP) rustc_rt.lsan | ||
$(TMPDIR)/leak 2>&1 | $(CGREP) 'detected memory leaks' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
#![feature(test)] | ||
|
||
use std::hint::black_box; | ||
use std::mem; | ||
|
||
fn main() { | ||
let xs = vec![1, 2, 3, 4]; | ||
mem::forget(xs); | ||
for _ in 0..10 { | ||
let xs = vec![1, 2, 3]; | ||
// Prevent compiler from removing the memory allocation. | ||
let xs = black_box(xs); | ||
mem::forget(xs); | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.