Skip to content

Commit ec229d4

Browse files
committed
rewrite extern-fn-explicit-align to rmake
1 parent fdcb614 commit ec229d4

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
@@ -27,7 +27,6 @@ run-make/env-dep-info/Makefile
2727
run-make/export-executable-symbols/Makefile
2828
run-make/extern-diff-internal-name/Makefile
2929
run-make/extern-flag-disambiguates/Makefile
30-
run-make/extern-fn-explicit-align/Makefile
3130
run-make/extern-fn-generic/Makefile
3231
run-make/extern-fn-mangle/Makefile
3332
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)