diff options
| author | 2026-10-15 02:46:57 +0330 | |
|---|---|---|
| committer | 2026-10-15 02:46:57 +0330 | |
| commit | 54d316a531ddb8e293711761e4f29e93d282599c (patch) | |
| tree | e062d2ef306dd9c9e28b293804d48b72789e0174 /tests/test.sh | |
| parent | rt: gc_drops finalizes a droppable value that reaches itself (a cycle, or a d... (diff) | |
std: File, the first user of drops: std.Host.open(path, mode) returns an owned std.File (or null) with write and read, and its drop closes the descriptor; Host.writefile is built on it; file_drop.zc, learn and readme
Diffstat (limited to 'tests/test.sh')
| -rwxr-xr-x | tests/test.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test.sh b/tests/test.sh index 6dfecf1..70e12b9 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -166,6 +166,7 @@ hello world!42 256 v" "$l a full capture is still terminated inside its buffer" chk "$($vm < tests/programs/sys.zc)" "2 zy time" "$l syscalls: write, read, time" + chk "$($vm < tests/programs/file_drop.zc)" "5 1 1 hello! 1" "$l std.File: its drop closes the descriptor at block end" chk "$($vm < tests/programs/memleak.zc)" $'leak: line 8 1 words\n1' "$l memdebug names a live allocation" chk "$($vm < tests/programs/uaf.zc)" $'zc: line 10: warning: use after free: this storage\'s lifetime ended on line 9\nzy: use after free from line 7\n at <stdin>:10 in main' "$l memdebug: use after free" chk "$($vm < tests/programs/uaf_in.zc)" $'zy: use after free from line 7\n at <stdin>:11 in main' "$l memdebug: use after free through an interior pointer" |
