how to debug when "Segmentation fault"

jepler at unpythonic.net jepler at unpythonic.net
Tue Oct 4 17:05:07 EDT 2005


I've rewritten your middle example to be clearer.
$ python2.4
Python 2.4.1 (#1, May 16 2005, 15:15:14) 
[GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> type("Y", (type,), {"mro": lambda x: [float]})("X", (), {})

and here's another one for you to enjoy:
>>> import marshal
>>> f = lambda: None
>>> code = marshal.loads(marshal.dumps(f.func_code).replace('d\0\0S','d\xff\xffS'))
>>> f.func_code = code
>>> f()

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20051004/d25137c8/attachment.sig>


More information about the Python-list mailing list