mirror of https://github.com/python/cpython
Fix math.factorial KeyboardInterrupt segfault. Thanks Amaury for report and diagnosis.
This commit is contained in:
parent
837cd06d36
commit
76464494bc
|
@ -132,6 +132,9 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #16305: Fix a segmentation fault occurring when interrupting
|
||||||
|
math.factorial.
|
||||||
|
|
||||||
- Issue #14398: Fix size truncation and overflow bugs in the bz2 module.
|
- Issue #14398: Fix size truncation and overflow bugs in the bz2 module.
|
||||||
|
|
||||||
- Issue #16220: wsgiref now always calls close() on an iterable response.
|
- Issue #16220: wsgiref now always calls close() on an iterable response.
|
||||||
|
|
|
@ -1330,14 +1330,13 @@ factorial_odd_part(unsigned long n)
|
||||||
Py_DECREF(outer);
|
Py_DECREF(outer);
|
||||||
outer = tmp;
|
outer = tmp;
|
||||||
}
|
}
|
||||||
|
Py_DECREF(inner);
|
||||||
goto done;
|
return outer;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
Py_DECREF(outer);
|
Py_DECREF(outer);
|
||||||
done:
|
|
||||||
Py_DECREF(inner);
|
Py_DECREF(inner);
|
||||||
return outer;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Lookup table for small factorial values */
|
/* Lookup table for small factorial values */
|
||||||
|
|
Loading…
Reference in New Issue