Skip to content
Unverified Commit ef21e3ad authored by Nikita Shulga's avatar Nikita Shulga Committed by GitHub
Browse files

Fix undefined behavior in xnextafterf (#357)

C standard does not define how sign bit should be handled during left shift, which triggers UBSAN runtime error:
```
src/libm/sleefsimdsp.c:3031:101: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
```
Discovered while working on https://github.com/pytorch/pytorch/pull/48275
parent 75153c66
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment