Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

TypedArray.prototype.set needs non-trivial changes #86

Closed

Description

@marjakh

In SetTypedArrayFromArrayLike ( https://tc39.es/ecma262/#sec-settypedarrayfromarraylike ), step 15.b can resize the target buffer. Step 15.e. checks for IsDetachedBuffer(targetBuffer); this needs to turn into an "out of bounds" check.

But in addition, I think it should re-get the target buffer length and compare it to the index it's setting, since SetValueInBuffer which it calls doesn't do any checking.

To do this, we need to keep track of the target index, not only the byte index. -> These changes are non-trivial and should be part of this proposal.

Activity

  1. marjakh commented on Jan 31, 2022

    @marjakh
    Author

    Clarification: This is only relevant in the case of length-tracking TAs which don't go out of bounds, so the TA won't be out of bounds but we'll still need to restrict the data we're setting.

  2. syg commented on Jan 31, 2022

    @syg
    Collaborator

    Steps 15.b, 15.c, and 15.d all can call user code, so, seems right. Will work on this today.

  3. added a commit that references this issue on Feb 1, 2022
    9066c91
  4. ljharb commented on Oct 24, 2023

    @ljharb
    Member

    Closed with #87. Also, the proposal has reached stage 4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions