Missing coverage: Resizable / Growable (Shared)ArrayBuffers: Bounds checking in TypedArray.prototype.set
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 564
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 10
Description
We don't seem to have test for the more complicated cases, e.g:
create resizable array buffer size 4, max 8
create length-tracking TypedArray (assuming 1-byte elements for this pseudo code)
resize buffer to 3
myTa.set([... ]) << too big array
I noticed this since I got my V8 implementation to a state where all TypedArray.prototype.set-related tests are passing, but I still didn't have RAB / GSAB support for the code path which computes the offset validity in this case.
cc @syg @sarahghp
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing TypedArray.prototype.set tests and related resizable or growable SharedArrayBuffer coverage. Add cases for a length-tracking TypedArray after resizing a buffer from 4 to 3 bytes, including an oversized source array, and ensure the bounds-checking paths are covered and passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100