Provenance related LLVM miscompilation in release mode #20198
Labels
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.12.0
Steps to Reproduce and Observed Behavior
@matu3ba mentioned that long-standing pointer provenance related bugs exists in LLVM.
Relevant LLVM issues: llvm/llvm-project#34577 and llvm/llvm-project#33896
I found a C repro by Matthew House. I couldn't find a relevant Zig tracking issue for the miscompilation, so here's a corresponding Zig repro tested on Zig 0.12:
This panics under all the three release modes, but not under debug mode.
Expected Behavior
No panic when compiling in release mode
The text was updated successfully, but these errors were encountered: