Skip to content

Commit

Permalink
Fix fuzz simple push pop in miri
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Dec 10, 2024
1 parent 4c80048 commit 6189aa8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pulley/src/interp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -798,10 +798,11 @@ impl Interpreter<'_> {
fn simple_push_pop() {
let mut state = MachineState::with_stack(vec![0; 16]);
unsafe {
let mut bytecode = [0; 10];
let mut i = Interpreter {
state: &mut state,
// this isn't actually read so just manufacture a dummy one
pc: UnsafeBytecodeStream::new((&mut 0).into()),
pc: UnsafeBytecodeStream::new(NonNull::new(bytecode.as_mut_ptr().offset(4)).unwrap()),
};
assert!(i.push::<crate::Ret, _>(0_i32).is_continue());
assert_eq!(i.pop::<i32>(), 0_i32);
Expand Down

0 comments on commit 6189aa8

Please sign in to comment.