Skip to content
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

Merged
merged 4 commits into from
Jul 16, 2018
Merged

run fullMIR tests in appveyor #401

merged 4 commits into from
Jul 16, 2018

Conversation

RalfJung
Copy link
Member

No description provided.

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" => {
Copy link
Member

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).

Copy link
Member Author

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...

Copy link
Member

@eddyb eddyb Jul 13, 2018

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.

Copy link
Member Author

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!

@RalfJung
Copy link
Member Author

Argh, AppVeyor does not trigger...

@RalfJung RalfJung closed this Jul 13, 2018
@RalfJung RalfJung reopened this Jul 13, 2018
@RalfJung RalfJung force-pushed the tests branch 3 times, most recently from e6e0e8f to 0baea37 Compare July 13, 2018 21:58
bors added a commit to rust-lang/rust that referenced this pull request Jul 15, 2018
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
@RalfJung
Copy link
Member Author

Dang, now it runs into thread-local storage stuff...

@RalfJung
Copy link
Member Author

Wow I can't believe this worked :D

@oli-obk oli-obk merged commit f18fc27 into rust-lang:master Jul 16, 2018
@RalfJung RalfJung deleted the tests branch August 14, 2018 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants