-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rust<->C by-val ABI issues on 32bit #2064
Comments
So, I've already worked around this issue in my uv_tcp branch (the sockaddr_in is passed by-ref into C from rust, huzzah). But you can repro the behavior I'm describing by:
|
Another issue, rust recs with i64 values does not seem to match c structures with int64_t types. |
some more additions, based on work to get libuv stuff passing on 32bit linux: Consider the following:
Here's some output:
I'm doing a 32bit build on my 64bit host (ubuntu oneiric) and I couldn't get valgrind working. thankfully linux2 is barfing on the same issue, I'm pretty sure (it originally lead me to put the debug println()s on this section of code). Here's its output (you can see the whole deal here )
looking at the above failure, a few things of note:
|
I have a branch with a test that exposes the possible stack smashing issue alluded to above (per graydon's analysis of the valgrind output). the test is named I think this is probably the only useful test. the others are probably related to mistakes on my part. |
also println->log(debug,) and assorted cleanup ahead of merge to master
This is blocking #4419 |
Isn't this an ABI issue that should be solved by writing proper |
@sanxiyn yes. |
bors should not have closed this |
Not critical for 0.6; de-milestoning |
@brson, is there still more work to be done here? |
I think we can close this. The FFI works well enough for libuv but there are remaining problems, including #5745 |
In my latest bit of work on libuv bindings in rust, I've come into some issues with passing structs, by-val, from Rust->C in windows (64bit host, 32bit rust build).
I've found a few things:
This is happening after #1402 was closed, and I know it was expected that there's be some bogeymen hiding out in 32bit edge cases, so hopefully this helps.
The text was updated successfully, but these errors were encountered: