Describe the effect of !noreturn

This commit is contained in:
Simon A. Nielsen Knights 2022-04-02 05:46:59 +00:00 committed by GitHub
parent d97f16c0b3
commit 4b9a00e96f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -801,3 +801,5 @@ Credit: @tauoverpi
```zig ```zig
echo "pub fn main() !noreturn { unreachable; }" > vimkill.zig; zig build-exe vimkill.zig echo "pub fn main() !noreturn { unreachable; }" > vimkill.zig; zig build-exe vimkill.zig
``` ```
This eventually [exhausts memory](https://github.com/ziglang/zig/issues/3461) on the machine which gives the OOM killer a chance to kill vim.