ReleaseSmall runtime error incorrectly returned. #20701
Labels
arch-riscv
RISCV-32 and RISCV-64
backend-llvm
The LLVM backend outputs an LLVM IR Module.
bug
Observed behavior contradicts documented or intended behavior
miscompilation
The compiler reports success but produces semantically incorrect code.
upstream
An issue with a third party project that Zig uses.
Milestone
Zig Version
0.14.0-dev.367+a57479afc
Steps to Reproduce and Observed Behavior
$ git clone -b erroneous-error https://git.sr.ht/~gcoakes/kernel
qemu-system-riscv64
is installed and available within your PATH environment variable:$ which qemu-system-riscv64
ReleaseSmall
optimization mode (pressCTRL+a, x
to exit after it fails):The log statement in that function prints:
8273 + 49 > 8712
Note that the specific error which is returned seems to be that of the last defined return location within that function. If I comment out the conditional/return statement from above, it then starts returning the next last defined return error.
I apologize for not being able to minimize this further.
Expected Behavior
The run command is expected to exit without any errors being printed. This can be observed by running the same command with either
-Doptimize=ReleaseSafe
or no optimization hint (Debug
mode):The text was updated successfully, but these errors were encountered: