[Cython] Bug: Returning real value crashes the code, complex value does not
Nikita Nemkin
nikita at nemkin.ru
Tue Apr 2 10:07:32 CEST 2013
Hi,
For your information, I was not able to reproduce the crash
in the following environment:
* Python 2.7.3 (x86, download from python.org)
* gcc (GCC) 4.7.2 (download from mingw.org)
* Windows 7 x64
The immediate fix for your problem seems to be upgrading gcc.
Note: using gcc 4.7 on Windows requires a patch to distutils,
see http://stackoverflow.com/a/6035864/204882 for details.
(You can probably monkey-patch it for production use.)
Best regards,
Nikita Nemkin
On Tue, 26 Mar 2013 15:52:02 +0600, Martin Fiers
<Martin.Fiers at intec.ugent.be> wrote:
> Dear Cython developers,
>
> I stumbled upon a strange error when using Cython. I made a minimal
> working example, see attachment for the two necessary files. (btw I
> didn't find the e-mail address of Robert Bradshaw so I could not request
> him for an account on the issue tracker. Is it possible to put the bug
> on there?)
>
> To reproduce the bug:
> 1) Reboot to Windows :) (the bug only appears on Windows)
> 2) Run compile_bug.py to generate the Cython extension
> 3) Try to run the my_func_exposed function:
>
> python
> >>> import complex_double
> (does not crash)
> >>> complex_double.my_func_exposed(1,1j)
> (crashes)
> >>> complex_double.my_func_exposed(1,1)
More information about the cython-devel
mailing list