Skip to content

Commit 76acfcc

Browse files
committed
Improve docs/comments
1 parent b379fcc commit 76acfcc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/concurrency/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
10191019
// immediately. In our interpreter loop we try to consult this value often, but if for
10201020
// whatever reason we don't get to that check or the cleanup we do upon finding that
10211021
// this bool has become true takes a long time, the exit here will promptly exit the
1022-
// process.
1022+
// process on the second Ctrl-C.
10231023
if SIGNALED.swap(true, Relaxed) {
10241024
std::process::exit(1);
10251025
}

src/machine.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,12 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
714714
def_id.is_local() || self.local_crates.contains(&def_id.krate)
715715
}
716716

717-
/// Called when the interpreter is going to shut down abnormally, such as due to a ctrl+c.
717+
/// Called when the interpreter is going to shut down abnormally, such as due to a Ctrl-C.
718718
pub(crate) fn handle_abnormal_termination(&mut self) {
719+
// All strings in the profile data are stored in a single string table which is not
720+
// written to disk until the profiler is dropped. If the interpreter exits without dropping
721+
// the profiler, it is not possible to interpret the profile data and all measureme tools
722+
// will panic when given the file.
719723
drop(self.profiler.take());
720724
}
721725
}

0 commit comments

Comments
 (0)