Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a19f601 + 039e0cd commit 9588593Copy full SHA for 9588593
2 files changed
Misc/NEWS
@@ -62,6 +62,9 @@ Core and Builtins
62
Library
63
-------
64
65
+- Issue #16305: Fix a segmentation fault occurring when interrupting
66
+ math.factorial.
67
+
68
- Issue #16116: Fix include and library paths to be correct when building C
69
extensions in venvs.
70
Modules/mathmodule.c
@@ -1381,14 +1381,13 @@ factorial_odd_part(unsigned long n)
1381
Py_DECREF(outer);
1382
outer = tmp;
1383
}
1384
-
1385
- goto done;
+ Py_DECREF(inner);
+ return outer;
1386
1387
error:
1388
1389
- done:
1390
Py_DECREF(inner);
1391
- return outer;
+ return NULL;
1392
1393
1394
/* Lookup table for small factorial values */
0 commit comments