Skip to content

Commit e2f287b

Browse files
nia-eRalfJung
andauthored
Apply suggestions from code review
Co-authored-by: Ralf Jung <post@ralfj.de>
1 parent 199bf13 commit e2f287b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/bin/miri.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,8 @@ fn main() {
756756
#[cfg(target_os = "linux")]
757757
if unsafe { miri::native_lib::init_sv() }.is_err() {
758758
eprintln!(
759-
"warning: The native-lib tracer could not be started. Is this a Linux system, and does Miri have permissions to ptrace?"
759+
"warning: The native-lib tracer could not be started. Is this a Linux system, and does Miri have permissions to ptrace?\n\
760+
Falling back to non-tracing native-lib mode."
760761
);
761762
}
762763
}

src/shims/native_lib/trace/stub.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ impl Supervisor {
1414
_: T,
1515
f: impl FnOnce() -> InterpResult<'tcx, crate::ImmTy<'tcx>>,
1616
) -> InterpResult<'tcx, (crate::ImmTy<'tcx>, Option<super::MemEvents>)> {
17+
// We acquire the lock to ensure that no two FFI calls run concurrently.
1718
let _g = SUPERVISOR.lock().unwrap();
1819
f().map(|v| (v, None))
1920
}

0 commit comments

Comments
 (0)