Skip to content

Commit 16a0784

Browse files
committed
print the damn diagnostic
1 parent fc8f2de commit 16a0784

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bin/miri.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -751,10 +751,11 @@ fn main() {
751751
debug!("rustc arguments: {:?}", rustc_args);
752752
debug!("crate arguments: {:?}", miri_config.args);
753753
if !miri_config.native_lib.is_empty() && miri_config.native_lib_enable_tracing {
754-
// FIXME(ptrace): This should display a diagnostic / warning on error
755754
// SAFETY: No other threads are running
756755
#[cfg(target_os = "linux")]
757-
let _ = unsafe { miri::native_lib::init_sv() };
756+
if unsafe { miri::native_lib::init_sv() }.is_err() {
757+
eprintln!("warning: The native-lib tracer could not be started. Is this a Linux system, and does Miri have permissions to ptrace?");
758+
}
758759
}
759760
run_compiler_and_exit(
760761
&rustc_args,

0 commit comments

Comments
 (0)