Mark Dickinson <[EMAIL PROTECTED]> added the comment: It looks like there's a refcounting bug in the code: if the call to PyNumber_Multiply fails then iobj gets DECREF'd twice. This means that a keyboard interrupt of factorial() can exit the interpreter:
Python 2.6a3+ (trunk:64341M, Jun 17 2008, 13:19:01) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from math import factorial [36374 refs] >>> factorial(10**9) ^CFatal Python error: /Users/dickinsm/python_source/trunk/Modules/mathmodule.c:562 object at 0x81f63c has negative ref count -1 Abort trap _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2138> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com