SystemError while execing bad code

Michael Hudson mwh at python.net
Thu Jan 22 05:17:45 EST 2004


Skip Montanaro <skip at pobox.com> writes:

>     Gerrit> exec CodeType(0,0,0,0,"",(),(),(),"","",0,"")
>     ...
>     Gerrit> But I guess this is a case of "so don't do it" :-)?
> 
>     Michael> Definitely.  It's easy enought to crash the interpreter this
>     Michael> way (think LOAD_CONST 30000, for just one easy way).
> 
> In fact, help(types.CodeType) describes it thusly:
> 
>     Create a code object.  Not for the faint of heart.
> 
> Should this sort of stuff be published on the Wiki?

I don't understand what you're suggesting here.

Cheers,
mwh

-- 
  Python enjoys making tradeoffs that drive *someone* crazy <wink>.
                                       -- Tim Peters, comp.lang.python



More information about the Python-list mailing list