[Pyrex] Pyrex 0.9: Compiled code produces segmentation fault

Paul Prescod paul.prescod at blastradius.com
Fri Jan 30 01:03:57 CET 2004


> -----Original Message-----
> From: Greg Ewing [mailto:greg at cosc.canterbury.ac.nz]
> Sent: Tuesday, January 27, 2004 3:16 PM
> To: pyrex at lists0.copyleft.no
> Subject: Re: [Pyrex] Pyrex 0.9: Compiled code produces segmentation
> fault
> 
> This might not be what's really happening -- it might just
> be a symptom of the heap having been corrupted by something
> else.

I agree. But in this case the memory manager is reliably reporting the error
on a particular line of C code. So I'm inclined to look at that line of code
first. ;) I haven't built a debugging Python 2.2 so I haven't investigated
it to the level that I'm totally confident it isn't heap corruption.

> ...
>
> I can't see anything wrong with your code, so it looks like
> it may be a Pyrex bug.
> 
> There was a problem reported recently concerning trouble that
> can arise if a garbage collection occurs during a __new__
> method -- this might be a manifestation of that.

As you pointed out, nothing is for sure, but the previous bug could be
reliably reproduced by putting a gc.collect() in the middle of __new__ and
this one cannot. Also the previous one was caused by calling around
constructors in an inheritance structure but this one has no inheritance.

 Paul Prescod




More information about the Pyrex mailing list