tustvold opened a new issue, #7356:
URL: https://github.com/apache/arrow-datafusion/issues/7356

   ### Describe the bug
   
   alter_fp_rounding_mode makes use of `fesetround` in order to alter the 
rounding mode on various architectures
   
   ```
   let current = fegetround();
   fesetround(if UPPER { FE_UPWARD } else { FE_DOWNWARD });
   let result = operation(lhs, rhs);
   fesetround(current);
   result
   ```
   
   Unfortunately if `operation` panics, `fesetround` will never revert the 
rounding mode
   
   
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   Ideally we wouldn't modify global thread-local state at all, but I'm not 
sure if this can be avoided
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to