script: Disable incremental garbage collection - #46316
Merged
Merged
Conversation
mrobinson
force-pushed
the
disable-incremental-gc
branch
2 times, most recently
from
July 6, 2026 19:00
ce9da7e to
d5940f7
Compare
jschwe
approved these changes
Jul 6, 2026
simonwuelker
approved these changes
Jul 6, 2026
Comment on lines
+282
to
+284
| /// Whether or not incremental garbage collection is turned on. This is currently | ||
| /// turned off by default as pre-barriers are not implemented yet. If turned on, it | ||
| /// will likely lead to memory corruption. |
The SpiderMonkey 137 inadvertently enabled incremental garbage collection. Previously it was preffed on, but disabled via the `DisableIncrementalGC(0` API which unconditionally disabled it no matter what `JSGCParamKey::JSGC_INCREMENTAL_GC_ENABLED` was set to. The upgrade replaced `DisableIncrementalGC()` with setting `JSGCParamKey::JSGC_INCREMENTAL_GC_ENABLED` to 0, but a later call set it to the value of the preference (`true`). This change removes the duplicate call and sets the default value fo the preference to `false`. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
mrobinson
force-pushed
the
disable-incremental-gc
branch
from
July 6, 2026 19:34
d5940f7 to
cdf1cb3
Compare
mrobinson
enabled auto-merge
July 6, 2026 19:35
Member
|
Good lord. |
Contributor
|
Is there an issue on what needs to be implemented for incremental garbage collection? |
Member
jschwe
pushed a commit
that referenced
this pull request
Jul 18, 2026
The SpiderMonkey 137 upgrade inadvertently enabled incremental garbage collection. Previously it was preffed on, but disabled via the `DisableIncrementalGC()` API which unconditionally disabled it no matter what `JSGCParamKey::JSGC_INCREMENTAL_GC_ENABLED` was set to. The upgrade replaced `DisableIncrementalGC()` with setting `JSGCParamKey::JSGC_INCREMENTAL_GC_ENABLED` to 0, but a later call set it to the value of the preference (`true`). This change removes the duplicate call and sets the default value fo the preference to `false`. Testing: This leads to *very* timing specific memory corruption errors, so making a reliable test for it is very difficult. Regardless, we should see improvements in fuzzing results. Signed-off-by: Martin Robinson <mrobinson@igalia.com> (cherry picked from commit 2e3c896)
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.
The SpiderMonkey 137 upgrade inadvertently enabled incremental garbage
collection. Previously it was preffed on, but disabled via the
DisableIncrementalGC()API which unconditionally disabled it no matter whatJSGCParamKey::JSGC_INCREMENTAL_GC_ENABLEDwas set to. The upgrade replacedDisableIncrementalGC()with settingJSGCParamKey::JSGC_INCREMENTAL_GC_ENABLEDto 0, but a later call set it to the value of the preference (
true). Thischange removes the duplicate call and sets the default value fo the preference
to
false.Testing: This leads to very timing specific memory corruption errors, so
making a reliable test for it is very difficult. Regardless, we should see
improvements in fuzzing results.