module_traverse segfault

Terry Reedy tjreedy at udel.edu
Mon Jun 16 21:43:16 EDT 2014


On 6/16/2014 4:16 PM, Roland Plüss wrote:

>> Was the program supposed to be shutting down when this occurred? Or
>> did this happen during 'normal' execution?
> Shutting down. It happens though also if I trigger an error for example
> using
>      if( ! PyArg_ParseTuple( args, "iiii", &x1, &y1, &x2, &y2 ) ){
>          return NULL;
>      }
> and proving for example floats instead of integer.
>
> So it happens as soon as the GC is involved.

Then I really recommend you upgrade to 3.4. From What's New:

CPython implementation improvements:
     Safe object finalization (PEP 442).
     Leveraging PEP 442, in most cases module globals are no longer set 
to None during finalization (issue 18214).

You might find the issue discussion interesting.

>> In any case, switch to 3.4.1 or later for improved gc and finalization.
>>
> Not in GenToo yet as far as I know.

Compile Python yourself. If you have trouble, post "Need help compiling 
3.4 on Gentoo" and I am sure you will get responses.

-- 
Terry Jan Reedy





More information about the Python-list mailing list