Mailing List Archive

mutating python VM opcodes
What's Python's reaction when presented with random bytecode sequence?
Slight mutation of a valid bytecode sequence?

Core dump, error message, something else?
mutating python VM opcodes [ In reply to ]
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