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

Only clear FE_INVALID when that symbol is present on the system #4954

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

derobins
Copy link
Member

When we initialize the floating-point types at library startup, it's possible to raise floating-point exceptions when we check which things are supported. Normally, we clear these floating-point exceptions via feclearexcept(FE_INVALID), but FE_INVALID may not be present on all systems. Specifically, this was reported as being a problem when using Emscripten 3.1.68 to compile HDF5 1.14.5 to WebAssembly.

We've added an #ifdef FE_INVALID block around the exception clearing code to correct this.

Fixes #4952

When we initialize the floating-point types at library startup, it's
possible to raise floating-point exceptions when we check which things
are supported. Normally, we clear these floating-point exceptions via
feclearexcept(FE_INVALID), but FE_INVALID may not be present on all
systems. Specifically, this was reported as being a problem when using
Emscripten 3.1.68 to compile HDF5 1.14.5 to WebAssembly.

We've added an #ifdef FE_INVALID block around the exception clearing
code to correct this.

Fixes HDFGroup#4952
@derobins derobins added Priority - 2. Medium ⏹ It would be nice to have this in the next release Component - C Library Core C library issues (usually in the src directory) Type - Bug Please report security issues to [email protected] instead of creating an issue on GitHub Merge - To 2.0 This needs to be merged to HDF5 2.0 labels Oct 14, 2024
@derobins derobins merged commit fc5b66b into HDFGroup:develop Oct 14, 2024
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - C Library Core C library issues (usually in the src directory) Merge - To 2.0 This needs to be merged to HDF5 2.0 Priority - 2. Medium ⏹ It would be nice to have this in the next release Type - Bug Please report security issues to [email protected] instead of creating an issue on GitHub
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use of FE_INVALID breaks WebAssembly builds of HDF5 1.14.5
3 participants