Interesting. I'd noticed that the metaclass one didn't crash my 2.2, but I didn't check the marshal one.
This one core dumps in 'Python 2.2.2 (#1, Feb 24 2003, 19:13:11) ... linux2'
but inexplicably prints 'keys' when I ran it on the 2.4.1 I used in my last
post.
>>> import marshal
>>> f = lambda: None
>>> d = marshal.dumps(f.func_code).replace('\0\0S', '~~S')
>>> f.func_code = marshal.loads(d)
>>> f()
This crashes both my 2.2.2 and 2.4.1:
>>> import marshal
>>> f = lambda: None
>>> d = marshal.dumps(f.func_code).replace('\0\0S', '\xff\xffS')
>>> f.func_code = marshal.loads(d)
>>> f()
Jeff
pgpHJKzMCPaq6.pgp
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list
