julia-gc: Repair the DISABLE_STACK_SCAN build - #6566
Open
fingolfin wants to merge 2 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6566 +/- ##
==========================================
- Coverage 79.02% 79.02% -0.01%
==========================================
Files 683 683
Lines 295189 295189
Branches 8638 8638
==========================================
- Hits 233265 233262 -3
- Misses 60105 60107 +2
- Partials 1819 1820 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lgoettgens
reviewed
Sep 9, 2026
fingolfin
force-pushed
the
mh/repair-disable-stack-scan
branch
from
September 10, 2026 10:36
347c57d to
812f0ad
Compare
That option is meant to turn off conservative stack scanning, but it had come to gate two unrelated things as well, so a build with it defined did not even start. Starting Julia was conditional on it. InitBags calls GAP_InitJuliaMemoryInterface, which is what invokes jl_init(), from a block guarded on stack scanning being enabled; with it disabled the first NewBag dereferenced a null current task. Whether GAP starts Julia depends only on whether GAP is the main program, not on how stacks are scanned. Marking GAP's global bags was conditional on it too. That loop lives in GapRootScanner, and the callback was only installed when stack scanning was enabled, so every global root - the symbol table among them - was collected on the first GC. Install the root scanner either way and guard only the stack walk inside it; scanning other tasks' stacks stays conditional, being purely conservative. With both separated, a DISABLE_STACK_SCAN build starts and runs into genuine rooting gaps rather than into this. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
fingolfin
force-pushed
the
mh/repair-disable-stack-scan
branch
from
September 10, 2026 13:55
812f0ad to
22f7f04
Compare
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.
That option is meant to turn off conservative stack scanning, but it had come to gate two unrelated things as well, so a build with it defined did not even start.
Starting Julia was conditional on it.
InitBagscallsGAP_InitJuliaMemoryInterface, which is what invokesjl_init, from a block guarded on stack scanning being enabled. With it disabled the firstNewBagdereferenced a null current task. Whether GAP starts Julia depends only on whether GAP is the main program, not on how stacks are scanned.Marking GAP's global bags was conditional on it too. That loop lives in
GapRootScanner, and the callback was only installed when stack scanning was enabled, so every global root (the symbol table among them) was collected on the first GC. Install the root scanner either way and guard only the stack walk inside it; scanning other tasks' stacks stays conditional, being purely conservative.With both separated, a
DISABLE_STACK_SCANbuild starts and runs into genuine rooting gaps rather than into this.Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com