Repository navigation
Conversation
…#1944) The evaluator ran the linux-sysroot build action to 58.7 GB and SIGKILL (x86_64, eric-5090), and 8 GiB in 23 s on the aarch64 pack (Mac), where the native runner needs 276 MB. A from-scratch build driven by a non-seed compiler takes this path before its runner exists. Three allocation sites, found with lldb on the forced worker: - extra_value_at deep-cloned every arena read: `self.bytes[i]` in the abilists reader cloned the 248691-byte text per byte read (with_str_clone_ref <- comptime_value_clone <- extra_value_at <- eval_field_access). It now shares the refcounted text, as extra_snapshot_value_at already did; write_binary, the one site that moved arena text into an owning str, clones there. - StringBuilder was a chain of CV_STRING_CHUNK arena values, three blocks per push, every chunk cloned twice to materialize, nothing released. A builder is now an index into the evaluator's Vec[StringBuilder]: push appends in place, len reads the buffer, to_str makes the one copy. - eval_fn_symbol_call_values_with_resolved_type_args cloned the caller's whole source text (build/sdk.w, 187 KB) on every user call for call-site defaults; it is now read only when a #line/#src default needs it. Measured, linux-sysroot under the evaluator (worker harness): x86_64, eric-5090: 17.0 GB at the 16 GiB cap in 33 s -> 900 MB, 29.9 s, pack byte-identical to the native runner's (sha256 13c29966...). Same via the driver (stage1 build :linux-sysroot --no-deps): SIGKILL at 58.7 GB after 250 s -> 879 MB, 41.7 s. aarch64, Mac: OOM at an 8 GiB cap in 23 s -> 864 MB, 52.1 s, pack sha256 e8d4b0ec..., the verified ARM pack. Native runner, x86_64: 276 MB, 21.9 s. The evaluator is within 3.3x. behav_1944_comptime_string_builder_bytes runs the evaluator worker on an action that pushes 1 MB byte by byte, and bounds its peak RSS over the same action at 1 byte. Before: +214 MiB (Mac, seed) and +209 MiB (Linux, main). After: passes on both hosts. Found on the way: `with check` accepts method calls with the wrong argument count (#1973). Seven stale call sites here passed check and failed only in the LLVM verifier.
This was referenced Oct 3, 2026
Contributor
Author
|
Battery GREEN on stack top 0f13a62 (seed-driven, |
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.
Fixes #1944. Measured with the build-action worker: x86_64 linux-sysroot under the evaluator was SIGKILLed at 58.7 GB (the issue's failure); now 41.7 s, 879 MB, pack byte-identical to the native runner's (13c29966…). aarch64 sysroot on the Mac under a 2 GiB cap: OOM before, 52 s / 864 MB after (e8d4b0ec…, the verified ARM pack). Native runner for comparison: 276 MB — evaluator at 3.3×. Causes (lldb): extra_value_at deep-cloned the value on every read (a 248 KB file copied once per byte read); StringBuilder stored one value per push with no release; every user call cloned the caller's 187 KB source. Fixture behav_1944_comptime_string_builder_bytes.w (1 MB byte-by-byte push, RSS delta bound) fails on the seed and on main's stage1, passes after, on Mac and Linux. Gate green. Joins the next campaign stack.