You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: unsupported operation: can't call foreign function: signal
--> /playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/mod.rs:119:17
|
119 | assert!(signal(libc::SIGPIPE, libc::SIG_IGN) != libc::SIG_ERR);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't call foreign function: signal
|
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
= note: inside `main::std::sys::unix::init::reset_sigpipe` at /playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/mod.rs:119:17
= note: inside `main::std::sys::unix::init` at /playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/mod.rs:62:5
= note: inside `main::std::sys_common::rt::init` at /playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/rt.rs:16:9
= note: inside `main::std::rt::lang_start_internal` at /playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:32:14
= note: inside `main::std::rt::lang_start::<()>` at /playground/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:48:5
This program:
Causes this error in Miri (playground):
But the program runs fine if
extern crate std;
is in the root module or the crate is not#![no_std]
.I encountered this issue when I was trying to access
std
by usingextern crate std;
in a#[test]
of a#![no_std]
crate.I guess that this is because the stack frame is
main::std::...
in this case, while this code (cc #1263) only checks forstd::...
:miri/src/shims/posix/foreign_items.rs
Line 504 in 453affa
The text was updated successfully, but these errors were encountered: