Merge pull request #238 from tauoverpi/patch-1

The zig stage1 way
This commit is contained in:
Luke Stephens (hakluke) 2022-04-02 23:33:01 +10:00 committed by GitHub
commit 200138c50c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -808,3 +808,12 @@ func main() {
3. Run with `go run .` or make executable using `go build -o VimKill`
## The zig stage1 way
Credit: @tauoverpi
```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.