Skip to content

Commit 8d43d72

Browse files
syvbRalfJung
andauthored
Check arg count
Co-authored-by: Ralf Jung <[email protected]>
1 parent 26e97ec commit 8d43d72

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/shims/intrinsics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
655655
"try" => return this.handle_try(args, dest, ret),
656656

657657
"breakpoint" => {
658+
let &[] = check_arg_count(args)?;
658659
// normally this would raise a SIGTRAP, which aborts if no debugger is connected
659660
throw_machine_stop!(TerminationInfo::Abort("Trace/breakpoint trap".to_string()))
660661
}

0 commit comments

Comments
 (0)