The implementation of `fesetenv` cannot be portable, as the value of `FE_DFL_ENV` differs between platforms. On FreeBSD, it is a actual environment. With glibc however, it's a sentinel -1 handled in the implementation of its floating point functions. With openlibm based on FreeBSD's libm, it assumes `FE_DFL_ENV` to be an actual environment. That assumption breaks using code that was compiled against glibc, e.g., `libcuda`: ``` Thread 1 "julia-debug" received signal SIGSEGV, Segmentation fault. 0x00007ffff7b855d0 in fesetenv () from /home/tim/Julia/julia/build/release/usr/bin/../lib/libopenlibm.so (gdb) bt ``` This reverts commitdev
5a27b4c0c0. Fixes https://github.com/JuliaLang/julia/issues/38427.
1 changed files with 1 additions and 1 deletions
Reference in new issue