-
Notifications
You must be signed in to change notification settings - Fork 822
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
Floating-point exception trapping not working #3657
Comments
This is (non-intuitively) the same as #1262. Easier repro is:
...which also exits silently. Your code raises a different signal ( [late edit for pedantry]
Nah it's raised alright. It just isn't handled the way you'd expect. |
Dove a bit because curious. This is novel enough to have its own home, so retracting the premature dupe. In the OP test case an exception is raised aight. The code doesn't make it to
|
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Please fill out the below information:
Your Windows build number: 10.0.17134.345
What you're doing and what's happening:
The following code has floating-point exception trapping enabled for divide-by-zero, however in WSL it does not raise a SIGFPE. It still exits with a non-zero exit code though.
WSL output:
The code should raise a SIGFPE and print "Floating point exception (core dumped)". This works on native Linux:
Ubuntu VM output:
Note also the different exit code compared to WSL.
The text was updated successfully, but these errors were encountered: