Closed jonahgraham closed 1 month ago
The test case added in #22261 can be modified to fail by changing the fopen from "a"
to "w"
.
Thanks @kripken for fixing this :-) And for all the reviews and merging on the related items.
Thanks for filing the issue, and the PRs!
The unreachable is because we are trying to truncate the file (I
fopen
ed it in"w"
mode). If I open in"a"
mode so we don't truncate it works fine.The truncating happens here:
https://github.com/emscripten-core/emscripten/blob/d72d7226f4733af8ff993dec70198cf09a24142d/system/lib/wasmfs/syscalls.cpp#L563-L564
_Originally posted by @jonahgraham in https://github.com/emscripten-core/emscripten/pull/22261#discussion_r1683665630_