A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-February/013165.html below:

[Python-Dev] test_builtin failing on Windows

[Python-Dev] test_builtin failing on WindowsTim Peters tim.one@home.com
Fri, 23 Feb 2001 15:49:17 -0500
The second time we get to here (in com_test, compile.c, and when running
python_d -O blah/blah/test_builtin.py, and test_b2.pyo doesn't exist):

		co = (PyObject *) icompile(CHILD(n, 0), c);
		if (co == NULL) {
			c->c_errors++;
			return;
		}
		symtable_exit_scope(c->c_symtable);
		if (co == NULL) {
			c->c_errors++;
			i = 255;
			closure = 0;
		} else {
			i = com_addconst(c, co);
			Py_DECREF(co);       ************** HERE *********
			closure = com_make_closure(c, (PyCodeObject *)co);
		}

the refcount of co is 1 before we do the Py_DECREF.  Everything else follows
from that.

In the failing 2nd time thru this code, com_addconst finds the thing
already, so com_addconst doesn't boost the refcount above 1.

The code appears a bit confused regardless (e.g., it checks for co==NULL
twice, but it looks impossible for the second test to succeed).




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4