Neil discovered a bad DECREF on warnoptions, that caused repeated
re-initializing Python (Py_Finalize() followed by Py_Initialize()) to
blow up quickly. With the DECREF removed I can't get it to fail any
more. (Except it still leaks, but that's probably a separate issue.)
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 85fdc7e..3df85ff 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -634,8 +634,7 @@
Py_INCREF(warnoptions);
}
if (warnoptions != NULL) {
- PyDict_SetItemString(sysdict, "warnoptions", v = warnoptions);
- Py_DECREF(v);
+ PyDict_SetItemString(sysdict, "warnoptions", warnoptions);
}
if (PyErr_Occurred())