-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
miscompilation possibly related to union layout #16392
Comments
We output llvm for unions in the same way as clang does, as can be seen by the fact that this bug reproduces with clang. |
Moving this to the 0.12.0 milestone since it's an issue to be solved in LLVM 17. |
Not fixed by a63a1c5 (LLVM 17). This miscompilation frequently happens when parsing a JSON value with two or more nested objects, so maybe it makes sense to implement the workaround suggested in the LLVM issue. |
CI doesn't run in Release mode but it can still be manually invoked
CI doesn't run in Release mode but it can still be manually invoked
CI doesn't run in Release mode but it can still be manually invoked
Fixed by #17963. |
That's a workaround, the issue stays open to track the upstream bug and a revert of the workaround. |
@jacobly0, with LLVM 18 the workaround can probably now be reverted. |
Zig Version
0.11.0-dev.3978+711b4e93e
Steps to Reproduce and Observed Behavior
running
zig run file.zig -O ReleaseSafe
will output:There is a zero at index 8.
This only happens in ReleaseSafe. I did not observe this behavior in 0.10.1.
https://godbolt.org/z/qc3MsW7d6
Expected Behavior
The text was updated successfully, but these errors were encountered: