adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Bugs in automake 1.11.3 and Python 2.7.3


From: Kai Sterker
Subject: Re: [Adonthell-devel] Bugs in automake 1.11.3 and Python 2.7.3
Date: Mon, 2 Jul 2012 11:26:33 +0200

On Sun, Jul 1, 2012 at 11:48 AM, Kai Sterker <address@hidden> wrote:

> http://bugs.python.org/issue15236
>
> Now we'll have to wait and see.

Turns out it is our fault after all. Problems with Python reference
counting. However, reporting the issue was quite helpful in getting
some valuable information about where to look. I've made some changes
and I would believe the problem to be gone (though it's hard to say
with something that happens infrequently).

Here's some stuff that I have learned in the exercise:

* Py_None needs to be INCREF'd before storing it in a tuple/list (like
everything else).
* PyTuple_SET_ITEM should only be used on empty tuples, but not to
replace existing elements.
* For every call into the Python C API, take good notice whether
methods return a new or borrowed reference, and whether they might
steal the reference you're passing to them.

This proved to be a useful and quite exhaustive article on the matter:

  http://edcjones.tripod.com/refcount.html


Please let me know if the issue still comes up after the changes I've made.

Kai



reply via email to

[Prev in Thread] Current Thread [Next in Thread]