Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export fenv functions on all platforms #213

Merged
merged 1 commit into from
Sep 2, 2020
Merged

Export fenv functions on all platforms #213

merged 1 commit into from
Sep 2, 2020

Conversation

staticfloat
Copy link
Contributor

Win32 has been using a hack to switch the fenv functions from static
to DLLEXPORT, we apply that hack to all platforms that do not use a
host fenv.h.

Win32 has been using a hack to switch the `fenv` functions from `static`
to `DLLEXPORT`, we apply that hack to all platforms that do not use a
host `fenv.h`.
@staticfloat staticfloat requested a review from Keno September 2, 2020 01:20
@Keno Keno merged commit 5a27b4c into master Sep 2, 2020
maleadt added a commit to maleadt/openlibm that referenced this pull request Nov 16, 2020
maleadt added a commit to maleadt/openlibm that referenced this pull request Nov 16, 2020
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 commit 5a27b4c.

Fixes JuliaLang/julia#38427.
staticfloat added a commit that referenced this pull request Nov 16, 2020
Revert "Export `fenv` functions on all platforms (#213)"
@giordano giordano deleted the sf/export_fenv branch November 18, 2020 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants