[Cfp-interest 2905] Signal handlers and the floating point environment

Rajan Bhakta rbhakta at us.ibm.com
Wed Oct 4 16:00:02 PDT 2023


Regarding C26B, issue 14, I believe the following may capture at least part of the issues raised.

What is the state of the floating-point environment upon a signal handler invocation? What about after the handler returns?
The floating point environment is not an object, but has thread storage duration. Signal handlers (outside abort and raise) accessing any object with static or thread storage duration results in undefined behaviour.
If an operation such as DBL_MAX + DBL_MAX occurs in the signal handler, what happens? Since no object is accessed, UB does not necessarily occur. But what happens?
What happens if a signal occurs during an operation that would modify the floating point environment?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20231004/b90e6b42/attachment.htm>


More information about the Cfp-interest mailing list