-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
zig segfaults with array and pointer code #1914
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
Comments
I managed to get cmake and llvm 7 and all the things to work, and turns out the zig on master no longer has this bug. |
The bug doesn't seem to be quite gone yet, even on latest master. This code makes the compiler crash with zig from latest master (
This seems to have something to do with types that refer to each other. Interestingly, the problem goes away if the reference is made nullable. Is this the idiomatic way to create cyclic-referring things, or is this a bug? Edit: |
possibly related: #1850. |
I don't think that's related. This one is a segfault, not an assertion error. |
Maybe #1735 is related? |
An assertion in a debug build is likely a segfault in a release build. |
This is fixed in master branch. I don't know when it was fixed, but I added your tests as additional regression tests, just to be safe. |
I think it might be good to figure out when exactly this got fixed, and what caused it to get fixed. Note that the first code example got "fixed" at some point, but changing it slightly showed that it wasn't quite fixed after all. |
I'm new to zig, so my code might be doing something that's a horribly bad idea. Anyway, it makes zig crash with no output.
Edit: information about versions of things:
I can't try this with the latest master because I'm having some issues with cmake.
The text was updated successfully, but these errors were encountered: