mutating python VM opcodes

Michael Hudson mwh21 at cam.ac.uk
Mon Jul 26 08:35:11 EDT 1999


On Mon, 26 Jul 1999, Eugene Leitl wrote:
> What's Python's reaction when presented with random bytecode sequence?
> Slight mutation of a valid bytecode sequence?
> 
> Core dump, error message, something else?
> 

Depends. If eval_code2 comes accross an invalid opcode it will throw a
SystemError exception. If, however, the opcode is valid but the argument
is corrupted, then a core dump is quite possible. A

LOAD_CONST 30000

will almost certainly provoke a segfault.

A "JUMP_FORWARD 30000" probably isn't too heathly either.

HTH
Michael





More information about the Python-list mailing list