diff --git a/crates/revmc/src/tests/mod.rs b/crates/revmc/src/tests/mod.rs index 5fc4616e..a646719a 100644 --- a/crates/revmc/src/tests/mod.rs +++ b/crates/revmc/src/tests/mod.rs @@ -138,6 +138,12 @@ tests! { expected_stack: &[U256::ZERO, U256::ZERO], expected_gas: 2 + 2, }), + eof_in_legacy_returncontract(@raw { + bytecode: &[op::PUSH0, op::PUSH0, op::RETURNCONTRACT, 0], + expected_return: InstructionResult::ReturnContractInNotInitEOF, + expected_stack: &[U256::ZERO, U256::ZERO], + expected_gas: 2 + 2, + }), } stack { @@ -832,6 +838,12 @@ tests! { expected_stack: &[U256::from(u64::MAX - 33)], expected_gas: 3 + 3, }), + mload_overflow6(@raw { + bytecode: &[op::ADDRESS, op::MLOAD], + expected_return: InstructionResult::InvalidOperandOOG, + expected_stack: &[DEF_ADDR.into_word().into()], + expected_gas: 5, + }), mstore1(@raw { bytecode: &[op::PUSH0, op::PUSH0, op::MSTORE], expected_memory: &[0; 32], diff --git a/crates/revmc/src/tests/runner.rs b/crates/revmc/src/tests/runner.rs index d0ffdc59..71088728 100644 --- a/crates/revmc/src/tests/runner.rs +++ b/crates/revmc/src/tests/runner.rs @@ -49,11 +49,6 @@ impl<'a> arbitrary::Arbitrary<'a> for TestCase<'a> { } } -#[cfg(feature = "__fuzzing")] -fn arbitrary_spec_id(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { - Ok(SpecId::try_from_u8(u.arbitrary::()? % 32).unwrap_or(DEF_SPEC)) -} - impl Default for TestCase<'_> { fn default() -> Self { Self {