-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
crash when using zig cc
to compile
#18147
Comments
just force updated and confirmed the bug still exists:
|
I'm not sure how helpful this is, but I disassembled the program and it seems
I don't know the compiler internals, but this definitely seems like a compiler bug 😅 |
That's Edit: it looks like the implementation itself might be broken? https://developer.apple.com/forums/thread/116121 - in general it's not recommended to use |
Workaround: add
ETA: __attribute__((no_sanitize("undefined")))
int main(int argc, char **argv) { ... } |
Zig Version
0.12.0-dev.105+f1992a39a
Steps to Reproduce and Observed Behavior
given:
compiling and running with zig cc crashes:
running with lldb points at the commented line above
Expected Behavior
same as llvm's cc:
The text was updated successfully, but these errors were encountered: