next.js
dc2dcdcd - turbo-tasks: route tail reads through TaskStorage for Stacked Borrows safety

Commit
37 days ago
turbo-tasks: route tail reads through TaskStorage for Stacked Borrows safety `&TaskStorageInner` only carries provenance over the head bytes, but the lazy-payload accessors read past `size_of::<TaskStorageInner>()` into the tail. Miri's Stacked Borrows check flagged the retag as UB. Move all tail-reading accessors plus their callers (`evictability`, `meta_counts`, `encode_meta`, `encode_data`, `encode`, `is_empty_*`, `all_lazy_*`) from `impl TaskStorageInner` to `impl TaskStorage`, where the receiver derives the tail pointer from the owning `NonNull<TaskStorageInner>` (full- allocation provenance). Updated callsite signatures (`take_snapshot`'s `P` bound, `encode_task_data`, `add_counts`, `task_name`) from `&TaskStorageInner` to `&TaskStorage`. All 16 storage_schema tests pass under Miri's default Stacked Borrows mode.
Author
Committer
Parents
Loading