-
-
Notifications
You must be signed in to change notification settings - Fork 159
fix(ci): repair release-gate regressions #8345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| ### Fixed | ||
|
|
||
| - `Uint8Array.prototype.map` and `toSorted` now keep their newly allocated | ||
| output Buffer live while a user callback runs. A callback-triggered full | ||
| mark-sweep could otherwise reclaim the output because its address existed | ||
| only in a Rust local, producing corrupt results in the GC representation | ||
| matrix when generational collection or write barriers were disabled. | ||
| - The compiled-package ambient `require()` regression test now expects the | ||
| Node-compatible `MODULE_NOT_FOUND` code that the runtime intentionally | ||
| returns for unresolved modules. | ||
| - The compiler-output gate now scopes the data-dependent numeric loop to its | ||
| array merge blocks. Its previous generated-label prefix also selected the | ||
| preceding setup loop and rejected that loop's legitimate one-time integer | ||
| conversion. |
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win
Reload rooted buffer addresses after every collection point.
maprootsout, but Line 766 cachesout_addrbefore Line 769 invokes user code. A relocating collection makesout_addrinvalid before Line 770 writes to it. The cachedaddrandreceiverat Line 765 also become invalid for the next loop iteration. In addition,uint8_alloc_like(recv.live().0, len)receives a raw source address, then allocates before it checks that address.sortandtoSortedhave the same failure. Line 929 cachesout_addrbefore comparator calls. Line 947 can then write through a stale receiver or output-buffer address.Reload
recv.live()immediately before each receiver use after a callback. Reloadout.live()immediately before each output write after a callback. Change the allocation helpers so they do not retain a source raw address acrossbuffer_alloc.crates/perry-runtime/src/object/typed_array_proto_thunks.rs#L761-L770: reload the receiver and output addresses from their roots per iteration, and do not pass a source snapshot throughuint8_alloc_like.crates/perry-runtime/src/object/typed_array_proto_thunks.rs#L925-L952: reload the receiver or output address after comparator execution before writing sorted values and before returningsort.As per coding guidelines, a GC-managed value root store must dominate each subsequent site that can collect. Based on learnings, Rust locals are not GC roots and must be reloaded after a collecting operation.
📍 Affects 1 file
crates/perry-runtime/src/object/typed_array_proto_thunks.rs#L761-L770(this comment)crates/perry-runtime/src/object/typed_array_proto_thunks.rs#L925-L952🤖 Prompt for AI Agents
Sources: Coding guidelines, Learnings