Skip to content

Commit bde9178

Browse files
committed
rewrite extern-fn-explicit-align to rmake
1 parent 205bfe7 commit bde9178

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ run-make/emit-to-stdout/Makefile
2424
run-make/export-executable-symbols/Makefile
2525
run-make/extern-diff-internal-name/Makefile
2626
run-make/extern-flag-disambiguates/Makefile
27-
run-make/extern-fn-explicit-align/Makefile
2827
run-make/extern-fn-generic/Makefile
2928
run-make/extern-fn-mangle/Makefile
3029
run-make/extern-fn-reachable/Makefile

tests/run-make/extern-fn-explicit-align/Makefile

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// The compiler's rules of alignment for indirectly passed values in a 16-byte aligned argument,
2+
// in a C external function, used to be arbitrary. Unexpected behavior would occasionally occur
3+
// and cause memory corruption. This was fixed in #112157, streamlining the way alignment occurs,
4+
// and this test reproduces the case featured in the issue, checking that it compiles and executes
5+
// successfully.
6+
// See https://github.com/rust-lang/rust/issues/80127
7+
8+
//@ ignore-cross-compile
9+
// Reason: the compiled binary is executed
10+
11+
use run_make_support::{build_native_static_lib, run, rustc};
12+
13+
fn main() {
14+
build_native_static_lib("test");
15+
rustc().input("test.rs").run();
16+
run("test");
17+
}

0 commit comments

Comments
 (0)