You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vexu
added
question
No questions on the issue tracker, please.
and removed
bug
Observed behavior contradicts documented or intended behavior
labels
Apr 5, 2024
Thx for your explanations, but shouldn't it be somehow explained by the compiler? Why is it even legal saving somewhere pointer to stack? In C it is considered memory leak and C report it immediately (and LLVM/clang explains where exactly it's happened, mb with sanitizers, I don't quite remember).
Zig Version
0.11.0 (x86_64-linux.3.16...5.10.81-gnu.2.19)
Steps to Reproduce and Observed Behavior
This snippet code organization / structure causes some strange behavior: segfaults, os.write faults, misreading. In this example my output is:
Mb I'm stupid and don't know how to work with pointers to comptime data, if so, please explain
Expected Behavior
Run correctly
The text was updated successfully, but these errors were encountered: