You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that using c++ math functions (like std::fmod) with long doubles result in a segfault using the current mingwpy version. This is gcc version 4.9.2 (x86_64-win32-seh-rev201506, mingwpy build).
Nathanial smith suggested:
Maybe the problem is that libstdc++ is getting compiled with -mlong-double-80, and that has ABI effects that make it incompatible with code compiled with -mlong-double-64? Is mingwpy's tweak of the spec file defaults happening before or after libstdc++ gets built?
To reproduce the segfault, compile foo.cxx below without any compiler flags:
Forcing 80 bit long doubles by adding the -mlong-double-80 compiler flag and including CRT_fp10.o does not fix the issue, probably since the mlong-double-64 flag is hardcoded in the 4.9.2 compiler specs.
The text was updated successfully, but these errors were encountered:
The following issue with numpy is probably connected. I built numpy 1.11.0 for Python 3.4.4 (Win64) with mingwpy's gcc 4.9.2 (x86_64-win32-seh-rev201506). The following python code resulted in a segfault when calling fmodl:
import numpy
import operator
a = numpy.array([1, 2, 3], dtype='g')
[operator.floordiv(a_, b_) for a_, b_ in zip(a,a)]
Backtrace:
#0 0x000000006c08cad0 in fmodl () from /d/develop/release/lib/site-packages/numpy-1.11.0-py3.4-win-amd64.egg/numpy/core/umath.pyd
#1 0x000000006c07fccc in npy_fmodl (y=1, x=1) at numpy/core/src/npymath/npy_math.c.src:482
#2 npy_divmodl (a=1, b=1, modulus=0x2ef218) at numpy/core/src/npymath/npy_math.c.src:621
#3 0x000000006c067cf7 in longdouble_ctype_floor_divide (out=0x2ef210, b=<optimized out>, a=<optimized out>) at numpy/core/src/umath/scalarmath.c.src:288
#4 longdouble_floor_divide (a=<optimized out>, b=0x38013a8) at numpy/core/src/umath/scalarmath.c.src:862
#5 0x0000000062d1732f in python34!_PyFloat_Unpack8 () from /d/develop/release/python34.dll
as mingwpy handles long doubles identical to doubles numpy (hint: MSVC compatibility) has to take care of it during build.
That was the case with a recently refused numpy PR. This PR has to be rebuild (be my) and published again. When this is done, is should be possible to build numpy with mingwpy again.
I noticed that using c++ math functions (like std::fmod) with long doubles result in a segfault using the current mingwpy version. This is gcc version 4.9.2 (x86_64-win32-seh-rev201506, mingwpy build).
Nathanial smith suggested:
To reproduce the segfault, compile foo.cxx below without any compiler flags:
Forcing 80 bit long doubles by adding the -mlong-double-80 compiler flag and including CRT_fp10.o does not fix the issue, probably since the mlong-double-64 flag is hardcoded in the 4.9.2 compiler specs.
The text was updated successfully, but these errors were encountered: