Skip to content

Commit 200138c

Browse files
authored
Merge pull request hakluke#238 from tauoverpi/patch-1
The zig stage1 way
2 parents 606f369 + 4b9a00e commit 200138c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,3 +808,12 @@ func main() {
808808

809809
3. Run with `go run .` or make executable using `go build -o VimKill`
810810

811+
## The zig stage1 way
812+
813+
Credit: @tauoverpi
814+
815+
```zig
816+
echo "pub fn main() !noreturn { unreachable; }" > vimkill.zig; zig build-exe vimkill.zig
817+
```
818+
819+
This eventually [exhausts memory](https://github.com/ziglang/zig/issues/3461) on the machine which gives the OOM killer a chance to kill vim.

0 commit comments

Comments
 (0)