[oscars-integration] Thread MutationContext token, resolve Gc borrow conflicts in environments - #5460
Open
shruti2522 wants to merge 1 commit into
Open
[oscars-integration] Thread MutationContext token, resolve Gc borrow conflicts in environments#5460shruti2522 wants to merge 1 commit into
shruti2522 wants to merge 1 commit into
Conversation
Test262 conformance changes
Broken tests (1):Tested main commit: |
shruti2522
force-pushed
the
integration4
branch
from
August 9, 2026 16:12
558bfdd to
93639d0
Compare
shruti2522
force-pushed
the
integration4
branch
from
August 10, 2026 02:09
6773ac6 to
292bef6
Compare
shruti2522
marked this pull request as ready for review
August 10, 2026 03:07
shruti2522
force-pushed
the
integration4
branch
2 times, most recently
from
August 10, 2026 17:52
3d4dae3 to
292bef6
Compare
shruti2522
force-pushed
the
integration4
branch
from
August 12, 2026 07:14
d5245ac to
cf36ebc
Compare
shruti2522
force-pushed
the
integration4
branch
14 times, most recently
from
August 13, 2026 08:32
06db6a6 to
913c716
Compare
shruti2522
marked this pull request as ready for review
August 14, 2026 03:50
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 80 out of 81 changed files in this pull request and generated 3 comments.
Suppressed comments (7)
core/engine/src/builtins/set/ordered_set.rs:20
Traceimplementation is effectively a no-op, soOrderedSetwon't mark anyJsValuekeys. This can lead to use-after-free under the mark-sweep GC backend and is inconsistent with the existingMapKey/JsValuestorage.
unsafe impl Trace for OrderedSet {
custom_trace!(this, mark, {
// Values in an IndexSet cannot be mutably borrowed. Since this is a null collector, we skip
});
}
core/engine/src/builtins/map/ordered_map.rs:50
Traceonly marks values, not keys.OrderedMapstores GC-managed keys (MapKey::Key(JsValue)), so omitting key tracing can allow keys (and the objects they reference) to be collected prematurely under the mark-sweep backend.
unsafe impl<V: Trace> Trace for OrderedMap<V> {
custom_trace!(this, mark, {
for v in this.map.values() {
mark(v);
}
});
}
core/engine/src/object/shape/shared_shape/forward_transition.rs:102
- Using
.copied()here forcesWeakGc<SharedShapeInner>to beCopy, which breaks compilation with the mark-sweep GC backend. Prefer.cloned()for backend-agnostic code.
.github/workflows/test262.yml:20 - This disables the entire test262 job for every PR/event (
if: false). If this is only meant to temporarily reduce CI load ondev/oscars-gc, consider scoping the condition to that branch; otherwise it removes an important correctness gate for all PRs.
run_test262:
if: false
name: Run the test262 test suite
core/engine/Cargo.toml:16
oscars_backendbecomes enabled by default forboa_engine. This is a major behavioral change (e.g. null collector semantics + dummyWeakMap) that affects all downstream users who rely on default features, and it also makes it harder to compare regressions vs the existing mark-sweep backend.
[features]
default = ["float16", "xsum", "temporal", "oscars_backend"]
core/gc/Cargo.toml:26
boa_gcnow enablesoscars_backendby default. Since the oscars null collector has very different semantics than the existing GC (and currently disables/changes weak structures), flipping the default is likely to be a breaking change for crates that depend onboa_gcwith default features.
Cargo.toml:275- Adding a workspace-level
[patch."https://github.com/boa-dev/boa.git"]causes all consumers to overrideboa_stringfor that git source, which is surprising and can break downstream dependency resolution. This kind of patch is usually kept in a local dev config or confined to a non-workspace crate (e.g. fuzz).
[patch."https://github.com/boa-dev/boa.git"]
boa_string = { path = "core/string" }
shruti2522
force-pushed
the
integration4
branch
2 times, most recently
from
August 14, 2026 06:58
43e10a6 to
4d8d942
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 78 out of 79 changed files in this pull request and generated 3 comments.
Suppressed comments (1)
core/gc/src/pointers/weak_map.rs:70
WeakMap::get_valuecallsEphemeron::valueusingMutationContext::dummy(), which bypasses the token requirement and makes this API usable without providing a realMutationContext. That defeats the purpose of threadingMutationContextthrough APIs and makes it harder to audit which code paths rely on the dummy token.
shruti2522
force-pushed
the
integration4
branch
from
August 15, 2026 01:38
17f0216 to
c3c71fe
Compare
Contributor
Author
|
@nekevss @jedel1043 this one ready for review, we can merge this |
shruti2522
force-pushed
the
integration4
branch
from
August 15, 2026 03:19
c3c71fe to
0730a11
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.
follow up to #5458
Implemented next part of the oscars GC migration.
Context::gc()to wrap token access. in the final phases of integration, we would only have to update this one spot.MutationContextby value into the environments api (push_lexical,push_function, etc)evalandjsonmodules