Skip to content
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

Missing coverage: Resizable / Growable (Shared)ArrayBuffers: More combinations for TypedArray.prototype.set #3391

Open
marjakh opened this issue Feb 2, 2022 · 0 comments

Comments

@marjakh
Copy link
Contributor

marjakh commented Feb 2, 2022

There are some tests which pass RAB/GSAB to TypedArray.prototype.set, but those don't seem to cover enough cases. Proof: I now have v8 in a state where all TA.p.set -related test262 tests pass, but there are bugs in the uncovered code paths. :)

At least these seem uncovered:

  1. target is a RAB/GSAB-TA and source is a non-RAB/GSAB TA and the source is not OOB

There is built-ins/TypedArray/prototype/set/typedarray-arg-target-out-of-bounds.js but it doesn't cover this case.

Here's a simple test that currently fails for my impl even though test262 passes:

let a = new Uint8Array(new ArrayBuffer(80, {maxByteLength: 100}));
let a2 = new Uint8Array(new ArrayBuffer(80));
a2.set(a);
  1. target is a non-RAB/GSAB-TA and source is a RAB/GSAB TA (both "source OOB" and "source not OOB" cases would be relevant)

  2. source and target have different element types

  3. SharedArrayBuffers (the existing test only uses ArrayBuffers)

  4. In addition, tests where the resizing happens when getting the length of the arraylike source in https://tc39.es/ecma262/#sec-settypedarrayfromarraylike , or when iterating the arraylike, are missing. But I think I have another open issue for covering those cases for all TA.p. functions.

cc @sarahghp @syg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant