File: plpython.c
Function: PLy_add_exceptions
Error: ob_refcnt of '*PLy_exc_spi_error' is 1 too high
3982 static void
3983 PLy_add_exceptions(PyObject *plpy)
3984 {
3985 	PyObject   *excmod;
3986 	HASHCTL		hash_ctl;
3987 
3988 #if PY_MAJOR_VERSION < 3
3989 	excmod = Py_InitModule("spiexceptions", PLy_exc_methods);
when Py_InitModule4_64() succeeds
3990 #else
3991 	excmod = PyModule_Create(&PLy_exc_module);
3992 #endif
3993 	if (PyModule_AddObject(plpy, "spiexceptions", excmod) < 0)
when PyModule_AddObject() succeeds
taking False path
3994 		PLy_elog(ERROR, "could not add the spiexceptions module");
3995 
3996 /*
3997  * XXX it appears that in some circumstances the reference count of the
3998  * spiexceptions module drops to zero causing a Python assert failure when
3999  * the garbage collector visits the module. This has been observed on the
4000  * buildfarm. To fix this, add an additional ref for the module here.
4001  *
4002  * This shouldn't cause a memory leak - we don't want this garbage collected,
4003  * and this function shouldn't be called more than once per backend.
4004  */
4005 	Py_INCREF(excmod);
4006 
4007 	PLy_exc_error = PyErr_NewException("plpy.Error", NULL, NULL);
when PyErr_NewException() succeeds
4008 	PLy_exc_fatal = PyErr_NewException("plpy.Fatal", NULL, NULL);
when PyErr_NewException() succeeds
4009 	PLy_exc_spi_error = PyErr_NewException("plpy.SPIError", NULL, NULL);
when PyErr_NewException() succeeds
new exception object from PyErr_NewException allocated at: 	PLy_exc_spi_error = PyErr_NewException("plpy.SPIError", NULL, NULL);
ob_refcnt is now refs: 1 + N where N >= 0
'*PLy_exc_spi_error' is now referenced by 1 non-stack value(s): PLy_exc_spi_error
4010 
4011 	Py_INCREF(PLy_exc_error);
4012 	PyModule_AddObject(plpy, "Error", PLy_exc_error);
when PyModule_AddObject() succeeds
4013 	Py_INCREF(PLy_exc_fatal);
4014 	PyModule_AddObject(plpy, "Fatal", PLy_exc_fatal);
when PyModule_AddObject() succeeds
4015 	Py_INCREF(PLy_exc_spi_error);
ob_refcnt is now refs: 2 + N where N >= 0
4016 	PyModule_AddObject(plpy, "SPIError", PLy_exc_spi_error);
when PyModule_AddObject() fails
4017 
4018 	memset(&hash_ctl, 0, sizeof(hash_ctl));
4019 	hash_ctl.keysize = sizeof(int);
4020 	hash_ctl.entrysize = sizeof(PLyExceptionEntry);
4021 	hash_ctl.hash = tag_hash;
4022 	PLy_spi_exceptions = hash_create("SPI exceptions", 256,
4023 									 &hash_ctl, HASH_ELEM | HASH_FUNCTION);
4024 
4025 	PLy_generate_spi_exceptions(excmod, PLy_exc_spi_error);
4026 }
returning
ob_refcnt of '*PLy_exc_spi_error' is 1 too high
was expecting final ob_refcnt to be N + 1 (for some unknown N)
due to object being referenced by: PLy_exc_spi_error
but final ob_refcnt is N + 2
found 3 similar trace(s) to this

File: plpython.c
Function: PLy_add_exceptions
Error: ob_refcnt of '*PLy_exc_fatal.302' is 1 too high
3982 static void
3983 PLy_add_exceptions(PyObject *plpy)
3984 {
3985 	PyObject   *excmod;
3986 	HASHCTL		hash_ctl;
3987 
3988 #if PY_MAJOR_VERSION < 3
3989 	excmod = Py_InitModule("spiexceptions", PLy_exc_methods);
when Py_InitModule4_64() succeeds
3990 #else
3991 	excmod = PyModule_Create(&PLy_exc_module);
3992 #endif
3993 	if (PyModule_AddObject(plpy, "spiexceptions", excmod) < 0)
when PyModule_AddObject() succeeds
taking False path
3994 		PLy_elog(ERROR, "could not add the spiexceptions module");
3995 
3996 /*
3997  * XXX it appears that in some circumstances the reference count of the
3998  * spiexceptions module drops to zero causing a Python assert failure when
3999  * the garbage collector visits the module. This has been observed on the
4000  * buildfarm. To fix this, add an additional ref for the module here.
4001  *
4002  * This shouldn't cause a memory leak - we don't want this garbage collected,
4003  * and this function shouldn't be called more than once per backend.
4004  */
4005 	Py_INCREF(excmod);
4006 
4007 	PLy_exc_error = PyErr_NewException("plpy.Error", NULL, NULL);
when PyErr_NewException() succeeds
4008 	PLy_exc_fatal = PyErr_NewException("plpy.Fatal", NULL, NULL);
when PyErr_NewException() succeeds
new exception object from PyErr_NewException allocated at: 	PLy_exc_fatal = PyErr_NewException("plpy.Fatal", NULL, NULL);
ob_refcnt is now refs: 1 + N where N >= 0
'*PLy_exc_fatal.302' is now referenced by 1 non-stack value(s): PLy_exc_fatal
4009 	PLy_exc_spi_error = PyErr_NewException("plpy.SPIError", NULL, NULL);
when PyErr_NewException() succeeds
4010 
4011 	Py_INCREF(PLy_exc_error);
4012 	PyModule_AddObject(plpy, "Error", PLy_exc_error);
when PyModule_AddObject() succeeds
4013 	Py_INCREF(PLy_exc_fatal);
ob_refcnt is now refs: 2 + N where N >= 0
4014 	PyModule_AddObject(plpy, "Fatal", PLy_exc_fatal);
when PyModule_AddObject() fails
4015 	Py_INCREF(PLy_exc_spi_error);
4016 	PyModule_AddObject(plpy, "SPIError", PLy_exc_spi_error);
when PyModule_AddObject() succeeds
4017 
4018 	memset(&hash_ctl, 0, sizeof(hash_ctl));
4019 	hash_ctl.keysize = sizeof(int);
4020 	hash_ctl.entrysize = sizeof(PLyExceptionEntry);
4021 	hash_ctl.hash = tag_hash;
4022 	PLy_spi_exceptions = hash_create("SPI exceptions", 256,
4023 									 &hash_ctl, HASH_ELEM | HASH_FUNCTION);
4024 
4025 	PLy_generate_spi_exceptions(excmod, PLy_exc_spi_error);
4026 }
returning
ob_refcnt of '*PLy_exc_fatal.302' is 1 too high
was expecting final ob_refcnt to be N + 1 (for some unknown N)
due to object being referenced by: PLy_exc_fatal
but final ob_refcnt is N + 2
found 3 similar trace(s) to this

File: plpython.c
Function: PLy_add_exceptions
Error: ob_refcnt of '*PLy_exc_error.304' is 1 too high
3982 static void
3983 PLy_add_exceptions(PyObject *plpy)
3984 {
3985 	PyObject   *excmod;
3986 	HASHCTL		hash_ctl;
3987 
3988 #if PY_MAJOR_VERSION < 3
3989 	excmod = Py_InitModule("spiexceptions", PLy_exc_methods);
when Py_InitModule4_64() succeeds
3990 #else
3991 	excmod = PyModule_Create(&PLy_exc_module);
3992 #endif
3993 	if (PyModule_AddObject(plpy, "spiexceptions", excmod) < 0)
when PyModule_AddObject() succeeds
taking False path
3994 		PLy_elog(ERROR, "could not add the spiexceptions module");
3995 
3996 /*
3997  * XXX it appears that in some circumstances the reference count of the
3998  * spiexceptions module drops to zero causing a Python assert failure when
3999  * the garbage collector visits the module. This has been observed on the
4000  * buildfarm. To fix this, add an additional ref for the module here.
4001  *
4002  * This shouldn't cause a memory leak - we don't want this garbage collected,
4003  * and this function shouldn't be called more than once per backend.
4004  */
4005 	Py_INCREF(excmod);
4006 
4007 	PLy_exc_error = PyErr_NewException("plpy.Error", NULL, NULL);
when PyErr_NewException() succeeds
new exception object from PyErr_NewException allocated at: 	PLy_exc_error = PyErr_NewException("plpy.Error", NULL, NULL);
ob_refcnt is now refs: 1 + N where N >= 0
'*PLy_exc_error.304' is now referenced by 1 non-stack value(s): PLy_exc_error
4008 	PLy_exc_fatal = PyErr_NewException("plpy.Fatal", NULL, NULL);
when PyErr_NewException() succeeds
4009 	PLy_exc_spi_error = PyErr_NewException("plpy.SPIError", NULL, NULL);
when PyErr_NewException() succeeds
4010 
4011 	Py_INCREF(PLy_exc_error);
ob_refcnt is now refs: 2 + N where N >= 0
4012 	PyModule_AddObject(plpy, "Error", PLy_exc_error);
when PyModule_AddObject() fails
4013 	Py_INCREF(PLy_exc_fatal);
4014 	PyModule_AddObject(plpy, "Fatal", PLy_exc_fatal);
when PyModule_AddObject() succeeds
4015 	Py_INCREF(PLy_exc_spi_error);
4016 	PyModule_AddObject(plpy, "SPIError", PLy_exc_spi_error);
when PyModule_AddObject() succeeds
4017 
4018 	memset(&hash_ctl, 0, sizeof(hash_ctl));
4019 	hash_ctl.keysize = sizeof(int);
4020 	hash_ctl.entrysize = sizeof(PLyExceptionEntry);
4021 	hash_ctl.hash = tag_hash;
4022 	PLy_spi_exceptions = hash_create("SPI exceptions", 256,
4023 									 &hash_ctl, HASH_ELEM | HASH_FUNCTION);
4024 
4025 	PLy_generate_spi_exceptions(excmod, PLy_exc_spi_error);
4026 }
returning
ob_refcnt of '*PLy_exc_error.304' is 1 too high
was expecting final ob_refcnt to be N + 1 (for some unknown N)
due to object being referenced by: PLy_exc_error
but final ob_refcnt is N + 2
found 3 similar trace(s) to this

File: plpython.c
Function: PLy_add_exceptions
Error: dereferencing NULL (PLy_exc_spi_error.306->ob_refcnt) at plpython.c:4015
3982 static void
3983 PLy_add_exceptions(PyObject *plpy)
3984 {
3985 	PyObject   *excmod;
3986 	HASHCTL		hash_ctl;
3987 
3988 #if PY_MAJOR_VERSION < 3
3989 	excmod = Py_InitModule("spiexceptions", PLy_exc_methods);
when Py_InitModule4_64() succeeds
3990 #else
3991 	excmod = PyModule_Create(&PLy_exc_module);
3992 #endif
3993 	if (PyModule_AddObject(plpy, "spiexceptions", excmod) < 0)
when PyModule_AddObject() succeeds
taking False path
3994 		PLy_elog(ERROR, "could not add the spiexceptions module");
3995 
3996 /*
3997  * XXX it appears that in some circumstances the reference count of the
3998  * spiexceptions module drops to zero causing a Python assert failure when
3999  * the garbage collector visits the module. This has been observed on the
4000  * buildfarm. To fix this, add an additional ref for the module here.
4001  *
4002  * This shouldn't cause a memory leak - we don't want this garbage collected,
4003  * and this function shouldn't be called more than once per backend.
4004  */
4005 	Py_INCREF(excmod);
4006 
4007 	PLy_exc_error = PyErr_NewException("plpy.Error", NULL, NULL);
when PyErr_NewException() succeeds
4008 	PLy_exc_fatal = PyErr_NewException("plpy.Fatal", NULL, NULL);
when PyErr_NewException() succeeds
4009 	PLy_exc_spi_error = PyErr_NewException("plpy.SPIError", NULL, NULL);
when PyErr_NewException() fails
4010 
4011 	Py_INCREF(PLy_exc_error);
4012 	PyModule_AddObject(plpy, "Error", PLy_exc_error);
when PyModule_AddObject() succeeds
4013 	Py_INCREF(PLy_exc_fatal);
4014 	PyModule_AddObject(plpy, "Fatal", PLy_exc_fatal);
when PyModule_AddObject() succeeds
4015 	Py_INCREF(PLy_exc_spi_error);
dereferencing NULL (PLy_exc_spi_error.306->ob_refcnt) at plpython.c:4015
found 3 similar trace(s) to this
4016 	PyModule_AddObject(plpy, "SPIError", PLy_exc_spi_error);
4017 
4018 	memset(&hash_ctl, 0, sizeof(hash_ctl));
4019 	hash_ctl.keysize = sizeof(int);
4020 	hash_ctl.entrysize = sizeof(PLyExceptionEntry);
4021 	hash_ctl.hash = tag_hash;
4022 	PLy_spi_exceptions = hash_create("SPI exceptions", 256,
4023 									 &hash_ctl, HASH_ELEM | HASH_FUNCTION);
4024 
4025 	PLy_generate_spi_exceptions(excmod, PLy_exc_spi_error);
4026 }

File: plpython.c
Function: PLy_add_exceptions
Error: dereferencing NULL (PLy_exc_fatal.305->ob_refcnt) at plpython.c:4013
3982 static void
3983 PLy_add_exceptions(PyObject *plpy)
3984 {
3985 	PyObject   *excmod;
3986 	HASHCTL		hash_ctl;
3987 
3988 #if PY_MAJOR_VERSION < 3
3989 	excmod = Py_InitModule("spiexceptions", PLy_exc_methods);
when Py_InitModule4_64() succeeds
3990 #else
3991 	excmod = PyModule_Create(&PLy_exc_module);
3992 #endif
3993 	if (PyModule_AddObject(plpy, "spiexceptions", excmod) < 0)
when PyModule_AddObject() succeeds
taking False path
3994 		PLy_elog(ERROR, "could not add the spiexceptions module");
3995 
3996 /*
3997  * XXX it appears that in some circumstances the reference count of the
3998  * spiexceptions module drops to zero causing a Python assert failure when
3999  * the garbage collector visits the module. This has been observed on the
4000  * buildfarm. To fix this, add an additional ref for the module here.
4001  *
4002  * This shouldn't cause a memory leak - we don't want this garbage collected,
4003  * and this function shouldn't be called more than once per backend.
4004  */
4005 	Py_INCREF(excmod);
4006 
4007 	PLy_exc_error = PyErr_NewException("plpy.Error", NULL, NULL);
when PyErr_NewException() succeeds
4008 	PLy_exc_fatal = PyErr_NewException("plpy.Fatal", NULL, NULL);
when PyErr_NewException() fails
4009 	PLy_exc_spi_error = PyErr_NewException("plpy.SPIError", NULL, NULL);
when PyErr_NewException() succeeds
4010 
4011 	Py_INCREF(PLy_exc_error);
4012 	PyModule_AddObject(plpy, "Error", PLy_exc_error);
when PyModule_AddObject() succeeds
4013 	Py_INCREF(PLy_exc_fatal);
dereferencing NULL (PLy_exc_fatal.305->ob_refcnt) at plpython.c:4013
found 3 similar trace(s) to this
4014 	PyModule_AddObject(plpy, "Fatal", PLy_exc_fatal);
4015 	Py_INCREF(PLy_exc_spi_error);
4016 	PyModule_AddObject(plpy, "SPIError", PLy_exc_spi_error);
4017 
4018 	memset(&hash_ctl, 0, sizeof(hash_ctl));
4019 	hash_ctl.keysize = sizeof(int);
4020 	hash_ctl.entrysize = sizeof(PLyExceptionEntry);
4021 	hash_ctl.hash = tag_hash;
4022 	PLy_spi_exceptions = hash_create("SPI exceptions", 256,
4023 									 &hash_ctl, HASH_ELEM | HASH_FUNCTION);
4024 
4025 	PLy_generate_spi_exceptions(excmod, PLy_exc_spi_error);
4026 }

File: plpython.c
Function: PLy_add_exceptions
Error: dereferencing NULL (PLy_exc_error.304->ob_refcnt) at plpython.c:4011
3982 static void
3983 PLy_add_exceptions(PyObject *plpy)
3984 {
3985 	PyObject   *excmod;
3986 	HASHCTL		hash_ctl;
3987 
3988 #if PY_MAJOR_VERSION < 3
3989 	excmod = Py_InitModule("spiexceptions", PLy_exc_methods);
when Py_InitModule4_64() succeeds
3990 #else
3991 	excmod = PyModule_Create(&PLy_exc_module);
3992 #endif
3993 	if (PyModule_AddObject(plpy, "spiexceptions", excmod) < 0)
when PyModule_AddObject() succeeds
taking False path
3994 		PLy_elog(ERROR, "could not add the spiexceptions module");
3995 
3996 /*
3997  * XXX it appears that in some circumstances the reference count of the
3998  * spiexceptions module drops to zero causing a Python assert failure when
3999  * the garbage collector visits the module. This has been observed on the
4000  * buildfarm. To fix this, add an additional ref for the module here.
4001  *
4002  * This shouldn't cause a memory leak - we don't want this garbage collected,
4003  * and this function shouldn't be called more than once per backend.
4004  */
4005 	Py_INCREF(excmod);
4006 
4007 	PLy_exc_error = PyErr_NewException("plpy.Error", NULL, NULL);
when PyErr_NewException() fails
4008 	PLy_exc_fatal = PyErr_NewException("plpy.Fatal", NULL, NULL);
when PyErr_NewException() succeeds
4009 	PLy_exc_spi_error = PyErr_NewException("plpy.SPIError", NULL, NULL);
when PyErr_NewException() succeeds
4010 
4011 	Py_INCREF(PLy_exc_error);
dereferencing NULL (PLy_exc_error.304->ob_refcnt) at plpython.c:4011
found 3 similar trace(s) to this
4012 	PyModule_AddObject(plpy, "Error", PLy_exc_error);
4013 	Py_INCREF(PLy_exc_fatal);
4014 	PyModule_AddObject(plpy, "Fatal", PLy_exc_fatal);
4015 	Py_INCREF(PLy_exc_spi_error);
4016 	PyModule_AddObject(plpy, "SPIError", PLy_exc_spi_error);
4017 
4018 	memset(&hash_ctl, 0, sizeof(hash_ctl));
4019 	hash_ctl.keysize = sizeof(int);
4020 	hash_ctl.entrysize = sizeof(PLyExceptionEntry);
4021 	hash_ctl.hash = tag_hash;
4022 	PLy_spi_exceptions = hash_create("SPI exceptions", 256,
4023 									 &hash_ctl, HASH_ELEM | HASH_FUNCTION);
4024 
4025 	PLy_generate_spi_exceptions(excmod, PLy_exc_spi_error);
4026 }