-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[Windows] Wrong ABI when interfacing with C code #28676
Labels
O-windows
Operating system: Windows
Comments
Someone pointed out that this is maybe not a MSVC-related issue. |
tomaka
changed the title
[MSVC] Wrong ABI when interfacing with C code
[Windows] Wrong ABI when interfacing with C code
Sep 26, 2015
Possibly related to #24427 |
ArgType::indirect(t, None) . The equivalent clang code: https://github.com/llvm-mirror/clang/blob/69b5694b76d36fde04c1f3511459a575e48f201d/lib/CodeGen/TargetInfo.cpp#L3338 .
|
tari
added a commit
to tari/rust
that referenced
this issue
Oct 14, 2015
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jan 17, 2021
…enkov Move some tests to more reasonable directories - 2 All tests with a score equal or greater than 1.0 were moved to their respective directories by issuing ```bash cat FILE | tr -s " " | tr -d '():' | sort -k3 | awk '$3 >= 1' | cut -d " " -f1-2 | sed 's;\\;/;g' | xargs -n2 git mv ``` **Observation**: The first column values is the only column with results greater zero To attest the confidentiality of the model, some manual revision of at least of tests is needed and this process will be tracked in the following list: * `src/test/ui/abi/issue-28676.rs` OK rust-lang#28676 * `src/test/ui/array-slice-vec/issue-15730.rs` OK * `src/test/ui/associated-types/issue-24338.rs` OK rust-lang#54823 * `src/test/ui/associated-types/issue-48551.rs` Looks OK rust-lang#48551 * `src/test/ui/associated-types/issue-50301.rs` Looks OK rust-lang#63577 ... cc rust-lang#73494 r? `@petrochenkov`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is a gist containing the entire source code if you want to reproduce.
When calling the function
foo
defined like this in C:And like this in Rust:
You get a crash with the MSVC version of Rust, but the MinGW version works.
This is because apparently the C code expects
Foo
to actually be a pointer.If you change the Rust declaration to
*const Foo
, then it works with the MSVC version and crashes with the MinGW version.The text was updated successfully, but these errors were encountered: