diff --git a/arch/EVM/EVMDisassembler.c b/arch/EVM/EVMDisassembler.c index dd4b915981..e52c3d2175 100644 --- a/arch/EVM/EVMDisassembler.c +++ b/arch/EVM/EVMDisassembler.c @@ -351,6 +351,7 @@ bool EVM_getInstruction(csh ud, const uint8_t *code, size_t code_len, case EVM_INS_RETURN: case EVM_INS_DELEGATECALL: case EVM_INS_REVERT: + case EVM_INS_CREATE2: MI->flat_insn->detail->groups[MI->flat_insn->detail->groups_count] = EVM_GRP_MEM_READ; MI->flat_insn->detail->groups_count++; break; diff --git a/tests/details/evm.yaml b/tests/details/evm.yaml index 6858de6d5a..abd51c41ee 100644 --- a/tests/details/evm.yaml +++ b/tests/details/evm.yaml @@ -21,4 +21,46 @@ test_cases: pop: 1 fee: 2 groups: [ EVM_GRP_STACK_READ ] + input: + bytes: [ 0x60, 0xe0, 0x1c, 0x59, 0x47, 0xff ] + arch: "evm" + options: [ CS_OPT_DETAIL ] + address: 0x0 + expected: + insns: + - + asm_text: "push1 224" + details: + evm: + push: 1 + fee: 3 + groups: [ EVM_GRP_STACK_WRITE ] + - + asm_text: "shr" + details: + evm: + pop: 2 + push: 1 + fee: 3 + groups: [ EVM_GRP_MATH ] + - + asm_text: "push0" + details: + evm: + push: 1 + fee: 3 + groups: [ EVM_GRP_STACK_WRITE ] + - + asm_text: "selfbalance" + details: + evm: + push: 1 + fee: 5 + - + asm_text: "selfdestruct" + details: + evm: + pop: 1 + fee: 5000 + groups: [ EVM_GRP_HALT ]