diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-06-10 17:55:17 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-06-10 17:55:17 -0700 |
| commit | 6bf529dc381cb2f5a83c5f9e303ffdab7779ac4d (patch) | |
| tree | 260738d5e702421ba7f368f3bfd31898ddc35367 /src/codegen.zig | |
| parent | 3c3bc5af29a5fcd1daaf8d8d39625c7b505e80bf (diff) | |
| download | zig-6bf529dc381cb2f5a83c5f9e303ffdab7779ac4d.tar.gz zig-6bf529dc381cb2f5a83c5f9e303ffdab7779ac4d.zip | |
link/wasm: fix writing past the end of debug info buffer
The function `writeDbgInfoNopsBuffered` was based on the function
`pwriteDbgInfoNops`, originally written by me, and then modified to
write to a memory buffer instead of an open file. When writing to a
file, any extra bytes beyond the end of the file extend the size of
the file, and the function body of `pwriteDbgInfoNops` takes advantage
of this when `next_padding_bytes` causes the write to go beyond the
end of the file. However, when writing to a memory buffer, the
underlying array list must be expanded if the write would cause the
buffer to expand.
Diffstat (limited to 'src/codegen.zig')
0 files changed, 0 insertions, 0 deletions
