Skip to content

Commit

Permalink
Change opcode generated by (panic) to INVALID
Browse files Browse the repository at this point in the history
EIP-141 ethereum/EIPs#141 has preserved 0xfe as an invalid opcode for aborting EVM execution. The EVM assembler supports this via the INVALID opcode. 

The LLL "panic" expression used to generate a jump to an invalid location in order to abort EVM execution.  This change brings "panic" into line with EIP-141 by generating the INVALID opcode instead.
  • Loading branch information
benjaminion committed Jun 7, 2017
1 parent 1fba984 commit c063dda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion liblll/CodeFragment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s)
}
else if (us == "PANIC")
{
m_asm.appendJump(m_asm.errorTag());
m_asm.append(Instruction::INVALID);
}
else if (us == "BYTECODESIZE")
{
Expand Down

0 comments on commit c063dda

Please sign in to comment.