blob: 613ae518d4efe5498933c8e37f32c75abb7bb827 [file] [log] [blame]
Armin Rigod77ef8f2006-06-28 10:49:51 +00001"""
2Broken bytecode objects can easily crash the interpreter.
Armin Rigob62efad2006-07-25 18:38:39 +00003
4This is not going to be fixed. It is generally agreed that there is no
5point in writing a bytecode verifier and putting it in CPython just for
6this. Moreover, a verifier is bound to accept only a subset of all safe
7bytecodes, so it could lead to unnecessary breakage.
8
9For security purposes, "restricted" interpreters are not going to let
10the user build or load random bytecodes anyway. Otherwise, this is a
11"won't fix" case.
12
Armin Rigod77ef8f2006-06-28 10:49:51 +000013"""
14
15import types
16
17co = types.CodeType(0, 0, 0, 0, '\x04\x71\x00\x00', (),
18 (), (), '', '', 1, '')
19exec co