Repository navigation
The debug allocator names the code holding the memory, and the leak it found is fixed: a check of the compiler holds 584 MB at its peak, was 933 (#618, #2407) - #3580
Merged
Conversation
added 2 commits
November 23, 2026 17:13
This was referenced Nov 24, 2026
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.
Two commits.
1. The debug allocator names the code holding the memory (#618).
WITH_DEBUG_ALLOC_SITES_AT=<n>prints, at allocationn(the peak report gives the number), the live blocks grouped by the call chain that allocated them, largest first. Chains are twelve frames deep.2. The leak that report found (#2407).
comptime_eval_finishhanded the Sema back with a store through a raw pointer, which releases nothing, so the blank Sema standing in for it leaked once per compile-time evaluation. Each blank had also indexed every declaration of the program. The blank is now taken out before the store, and onlySema.initbuilds the index.src/main.withTest:
behav_2407_comptime_eval_releases_its_blank_sema(400 evaluations, 3,400 declarations, 64 MB limit) fails on main with "memory limit exceeded" and passes here. The tripwire limit is unchanged.Evidence at 540ce6a: pre-checks green; battery GREEN (501 s); linux-aarch64 container leg green (
:build,:behavior-tests,:debug-alloc-tests);:release-checkssurvey: all targets green.Closes #618. Closes #2407.