-
-
Notifications
You must be signed in to change notification settings - Fork 159
docs(array): correct the receiver-backing claim behind a recurring bug family #8142
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| ### Fixed | ||
|
|
||
| - **Corrected the `array_receiver_gc_tag` doc comment that caused a recurring | ||
| silent-drop bug family.** The comment stated flatly that `Buffer` and | ||
| `TypedArray` payloads are `std::alloc`-backed with no `GcHeader`. That is | ||
| true for only one of the two backings these receivers actually have, and | ||
| reading it as universal is how the same defect kept being reintroduced — | ||
| five separate PRs (#8090, #8109, #8119, #8120, #8130) each fixed one | ||
| instance of a receiver being nulled or misread at an array funnel, and the | ||
| sweep in `gc-handoff/ARRAY-SWEEP-NOTES.md` found more (#8137, #8138). | ||
|
|
||
| Both backings exist and reach these funnels: | ||
|
|
||
| - **arena-backed** — `buffer/header.rs`'s `arena_alloc_gc_old(…, | ||
| GC_TYPE_BUFFER)` and `typedarray/mod.rs`'s `GC_TYPE_TYPED_ARRAY` site. | ||
| These carry a genuine `GcHeader` with a correct `obj_type`. They are | ||
| *pinned*, which is a different property from being *untracked* — the | ||
| conflation is the root of the confusion. This is the population #8041 | ||
| began nulling. | ||
| - **external** — `EXTERNAL_BUFFER_REGISTRY` / `EXTERNAL_UINT8ARRAY_REGISTRY` | ||
| addresses and `shared_sab::alloc_shared_sab`'s `alloc_zeroed`. For these | ||
| the eight bytes below the payload really are allocator bookkeeping. | ||
|
|
||
| The tag is therefore authoritative only once the address is known to be | ||
| arena-backed, which `typedarray::arena_payload_has_gc_type` already does | ||
| properly (range check, `HeapSpace::Unknown` rejection against the *header* | ||
| address, `gc_type_info` validation). The comment now says so and points at | ||
| it, so the next reader does not open-code a floor instead. | ||
|
|
||
| Comment-only; no behaviour change. | ||
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.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Keep the changelog entry focused and add validation notes.
The fragment explains the root cause and affected paths, but it also lists internal PR history and does not record the validations passed for this change. Describe the final documentation correction as one coherent release-note entry and add
cargo fmt --all -- --check,scripts/check_file_size.sh, andscripts/addr_class_inventory.py.Based on learnings: changelog fragments should describe final shipped behavior as one coherent entry and include root cause, affected paths, and validation notes.
🤖 Prompt for AI Agents
Source: Learnings