[Cython] Temp allocation bug
Dag Sverre Seljebotn
dagss at student.matnat.uio.no
Sun Jan 18 12:48:10 CET 2009
Stefan Behnel wrote:
> Hi,
>
> Robert Bradshaw wrote:
>> On Jan 17, 2009, at 4:41 AM, Stefan Behnel wrote:
>>
>>> Robert Bradshaw wrote:
>>>> It seems there's a bug in temp allocation, basically a temp is
>>>> allocated but never released (even though it's freed).
>>>>
>>>> See http://hg.cython.org/cython-devel/file/4f0327bdebc9/tests/run/
>>>> call_crash.pyx
>>> The problem is that AttributeNode is not a NewTempExprNode and thus
>>> fails
>>> to pass on the request for freeing the temp. Changing its baseclass
>>> fixes
>>> this problem, but it also breaks tons of other test cases. It might
>>> just be
>>> one problem that kills all of them, but in any case, this needs some
>>> investigation. I'll try to look into it this weekend if I find the
>>> time.
>> Is this going to be a general problem with any inside a
>> NewTempExprNode (plain) ExprNode?
>
> I can't answer that in general, but the good news is that there are very
> few ExprNodes left, especially those that can contain subexpressions.
> Fixing the AttributeNode will get us pretty far. Sadly, I can't do that
> this weekend. So, if someone else could jump in and (at least) analyse the
> resulting problems after the switch, that would be great.
My intention with NewTempExpr node was simultaneous use, and I don't see
any obstacles in principle.
In this case it was a rather embarrassing and simple mistake, fix is up.
However, making AttributeNode a NewTempExprNode didn't cause any more
failures for me -- were they unreliable segfaults, or were you trying it
on lxml?
--
Dag Sverre
More information about the Cython-dev
mailing list