riscv-musl
riscv-musl copied to clipboard
fsetenv(FE_DFL_ENV) fails
I was running libc-test on both musl RV32 and RV64 port and I happened to find that math/fenv fails due to a segmentation fault.
It is caused by dereferencing FE_DFL_ENV, which is defined as ((const fenv_t *) -1)
.
I've sent a patch to the mailing list. Yet the RV32 part is not in the upstream and I think that it's better to have a formal patch. So I attach a patch containing both RV32 and RV64 fixes here :
0001-riscv32-64-fenv.S-Fix-fesetenv-FE_DFL_ENV-failure.patch.txt