[Python-3000-checkins] r66562 - python/branches/py3k/Modules/atexitmodule.c

skip at pobox.com skip at pobox.com
Tue Sep 23 04:57:54 CEST 2008


    >> Log:
    >> Fix for issue 3666 - atexit.register with bad inputs segfaults on exit.
    >> Reviewed by Christian Heimes.

    Benjamin> Test?

How do you write a test case for broken code which causes a segfault?
To recap, executing this code:

    import sys, atexit
    atexit.register(lambda: 1, 0, 0, (x for x in (1,2)), 0, 0)
    sys.exit()

crashes the interpreter.  With the fix suggested by Christian that I checked
in it doesn't.

Skip


More information about the Python-3000-checkins mailing list