[Python-Dev] Is core dump always a bug? Advice requested

Jewett, Jim J jim.jewett at eds.com
Thu May 13 10:23:55 EDT 2004


Martin v. L?wis:

> Therefore, byte code verification usually puts additional
> constraints on byte code, rejecting some correct code as
> unverifiable.

An alternative would be to accept unverifiable code.

You won't stop all problems, but you can still catch
the most common mistakes.  For instance, the example
that started this thread was apparently an ASCII string
of uncomiled source code.

Just checking that all instructions are valid bytecodes
might have caught this.  Also checking that arguments 
are possible (no jumping beyond the code) would probably
have caught it.  

Verifying stack depth and such might be overkill for a 
first pass sanity check.

-jJ



More information about the Python-Dev mailing list