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 9819105 + 7646449 commit 039e0cdCopy full SHA for 039e0cd
2 files changed
Misc/NEWS
@@ -879,6 +879,9 @@ Core and Builtins
879
Library
880
-------
881
882
+- Issue #16305: Fix a segmentation fault occurring when interrupting
883
+ math.factorial.
884
+
885
- Issue #9803: Don't close IDLE on saving if breakpoint is open.
886
Patch by Roger Serwy.
887
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