[libc-commits] [libc] [libc][math][c23] Add exp10m1f C23 math function (PR #87992)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Mon Apr 29 13:13:19 PDT 2024
jhuber6 wrote:
> UBSan throws an error when running `libc.test.src.math.exp10m1f_test.__unit__`:
>
> ```
> /home/overmighty/projects/llvm-project/libc/src/math/generic/explogxf.h:164:20: runtime error: left shift of negative value -25
> ```
Shifting by anything outside of `[0, n]` for a `2^n` integer type is UB. We'd probably need to clamp the result, or just find where it goes negative and make it stop doing that.
https://github.com/llvm/llvm-project/pull/87992
More information about the libc-commits
mailing list