Automatic rebaseline of codesize expectations. NFC - #1
Open
github-actions[bot] wants to merge 1 commit into
Open
Automatic rebaseline of codesize expectations. NFC#1github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
This is an automatic change generated by tools/maint/rebaseline_tests.py. The following (16) test expectation files were updated by running the tests with `--rebaseline`: ``` code_size/random_printf_wasm.json: 12506 => 12498 [-8 bytes / -0.06%] code_size/random_printf_wasm2js.json: 17186 => 17215 [+29 bytes / +0.17%] other/codesize/test_codesize_cxx_ctors1.size: 129756 => 129749 [-7 bytes / -0.01%] other/codesize/test_codesize_cxx_ctors2.size: 129141 => 129134 [-7 bytes / -0.01%] other/codesize/test_codesize_cxx_except.size: 171426 => 171419 [-7 bytes / -0.00%] other/codesize/test_codesize_cxx_except_wasm.size: 144872 => 144865 [-7 bytes / -0.00%] other/codesize/test_codesize_cxx_except_wasm_legacy.size: 142462 => 142455 [-7 bytes / -0.00%] other/codesize/test_codesize_cxx_lto.size: 121986 => 121979 [-7 bytes / -0.01%] other/codesize/test_codesize_cxx_mangle.size: 235490 => 235483 [-7 bytes / -0.00%] other/codesize/test_codesize_cxx_noexcept.size: 132129 => 132122 [-7 bytes / -0.01%] other/codesize/test_codesize_cxx_wasmfs.size: 169999 => 169992 [-7 bytes / -0.00%] other/codesize/test_codesize_hello_O0.size: 15170 => 15163 [-7 bytes / -0.05%] other/codesize/test_codesize_hello_dylink.size: 18550 => 18543 [-7 bytes / -0.04%] other/test_unoptimized_code_size.wasm.size: 15170 => 15163 [-7 bytes / -0.05%] other/test_unoptimized_code_size_no_asserts.wasm.size: 12251 => 12244 [-7 bytes / -0.06%] other/test_unoptimized_code_size_strict.wasm.size: 15170 => 15163 [-7 bytes / -0.05%] Average change: -0.01% (-0.06% - +0.17%) ```
arsnyder16
pushed a commit
that referenced
this pull request
Jul 21, 2026
…ore#27284) $doReadv reads iovec-by-iovec via `FS.read`. On a non-blocking socket, `FS.read` (nodeSockOps.recvmsg) throws EAGAIN when the queue is empty, unlike a regular file which returns 0. If an earlier iovec already consumed data and filled exactly to its length (so the `if (curr < len) break` doesn't fire), the loop advances to the next iovec, whose `FS.read` throws EAGAIN. The exception escaped `doReadv`, discarding the accumulated `ret`, so the whole `readv(2)` failed with EAGAIN even though bytes were read. POSIX readv/writev are single gather operations: they return the available byte count and never fail after partial success. Observed with an mio `TcpStream` (NODERAWSOCKETS + PROXY_TO_PTHREAD + JSPI) where an echo returned as two TCP chunks: `read_vectored` with two iovecs hit recvmsg on iovec #1 (12 bytes, drains recvq) then recvmsg EMPTY on iovec emscripten-core#2 (next chunk not yet arrived), throwing WouldBlock for the whole call. A single-buffer read never hits it — matching "read works, readv fails". It is timing-sensitive: if both chunks are queued before the read, iovec emscripten-core#2 succeeds. - `doReadv` and `doWritev` now catch `EAGAIN`/`EWOULDBLOCK` `FS.ErrnoError` from a subsequent iovec and return the accumulated count when `ret > 0`, only rethrowing when `ret == 0` (nothing transferred yet, so the would-block belongs to the first iovec). Adds `test/fs/test_readv_eagain.c` (wired up as `test_fs_readv_eagain`), which registers custom devices that satisfy the first iovec fully then throw EAGAIN, asserting both `readv` and `writev` return the partial count rather than failing. The test aborts without the fix and passes with it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an automatic change generated by tools/maint/rebaseline_tests.py.
The following (16) test expectation files were updated by
running the tests with
--rebaseline: