-
Notifications
You must be signed in to change notification settings - Fork 361
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
run fullMIR tests in appveyor #401
Conversation
src/fn_call.rs
Outdated
let usize = self.tcx.types.usize; | ||
// any non zero value works for the stdlib. This is just used for stackoverflows anyway | ||
self.write_scalar(dest, Scalar::from_u128(1), usize)?; | ||
}, | ||
"std::sys::windows::c::::GetModuleHandleW" | | ||
"std::sys::windows::c::::GetProcAddress" | | ||
"std::sys::windows::c::::SetLastError" => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, why do these use the "pretty" path, when they're FFI imports? IMO they should only check the symbol name of the function (which is either given by an attribute, or the name of the item itself).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do that for C ABI calls but this is not C ABI. It's some other ABI.
We should do the same thing, really, but I'd have to figure out which ABI this is first...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, you should do this for all ABIs. The ABI doesn't matter.
Only tcx.is_foreign_item(def_id)
matters.
EDIT: the only thing you might want to use an ABI for is whitelisting the ways a function can be called in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I did not know about is_foreign_item
, thanks!
Argh, AppVeyor does not trigger... |
e6e0e8f
to
0baea37
Compare
CTFE: use binary_op to compare integer with match disriminant This is needed to unblock rust-lang/miri#401: There is code in the Windows initialization functions that uses `match` to test whether a pointer is NULL. I will add a testcase in miri; I was not sure where to add a testcase in Rust itself. r? @oli-obk
Dang, now it runs into thread-local storage stuff... |
Wow I can't believe this worked :D |
No description provided.