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.
1 parent b66a4ad commit 15023d5Copy full SHA for 15023d5
Objects/longobject.c
@@ -3653,7 +3653,10 @@ long_dealloc(PyObject *self)
3653
{
3654
assert(self);
3655
if (_PyLong_IsCompact((PyLongObject *)self)) {
3656
- if (compact_int_is_small(self)) {
+
3657
+ // test what happens if we do hit the "never should get called": we should expect memory leaks, but no crashes
3658
+ int dotest = 1;
3659
+ if (compact_int_is_small(self) || dotest) {
3660
/* This should never get called, but we also don't want to SEGV if
3661
* we accidentally decref small Ints out of existence. Instead,
3662
* since small Ints are immortal, re-set the reference count.
0 commit comments