New submission from Amaury Forgeot d'Arc:

>>> import math, sys
>>> math.factorial(sys.maxsize - 1)
(Hit Ctrl-C)
Segmentation fault

The cause is probably in mathmodule.c::factorial_odd_part():
  error:
    Py_DECREF(outer);
  done:
    Py_DECREF(inner);
    return outer;
In case of error, the function returns a released reference instead of NULL.

----------
messages: 173643
nosy: amaury.forgeotdarc
priority: normal
severity: normal
status: open
title: possible segfault in math.factorial
type: crash
versions: Python 3.2, Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16305>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to