On Fri, Feb 27, 2009 at 8:28 AM, Stefan Behnel <[email protected]> wrote:
> Hi,
>
> I have a problem with a method in a subclass that overrides the parent
> method. The setup is basically as follows:
>
> -------------------------------
...
> -------------------------------
>
> The problem with this is that gcc 4.3.2(-1ubuntu12) generates a call to the
> baseclass's _copy() method instead of the one in _XSLTContext, which
> prevents the "_extension_elements" field from being set. I can fix this by
> passing "-fno-strict-aliasing" to gcc. However, I thought this was fixed in
> Py3, where I also get the above problem.
>
> Does anyone have an idea if there is anything we can do in Cython to fix
> this? Or does anyone see anything in the code that might trigger this?

AFAIK, Python 3 only fixes one (pervasive) instance of the problem.
See http://www.python.org/dev/peps/pep-3123/ for more information.
But Cython already uses the essence of this fix, by including "parent"
object and vtab structs as __pyx_base, rather than just duplicating
the field member list from the parent.

Are you sure that the problem is with the call to _copy?  I'd think
that an aliasing problem would be at least as likely (probably more
likely) to show up in the initialization; so maybe your _XSLTContext
object doesn't actually have the right vtable, or maybe the "_copy"
entry in the vtable somehow points to the wrong function.

Carl
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to