Skip to content

Conversation

bnoordhuis
Copy link
Contributor

@bnoordhuis bnoordhuis commented Dec 10, 2023

Per spec: detaching the TA mid-iteration is allowed and should not not throw an exception.

In the case of TypedArray.prototype.set, because iteration over the source array is observable, we cannot bail out early when the TA is first detached.

In the case of TypedArray.prototype.sort that means we should not explicitly check for detachment and just handle it gracefully.

@bnoordhuis
Copy link
Contributor Author

Per spec: detaching the TA mid-iteration is allowed and should not
not throw an exception.

In the case of TypedArray.prototype.set, because iteration over the
source array is observable, we cannot bail out early when the TA is
first detached.
@bnoordhuis
Copy link
Contributor Author

I'm backing out the changes to TypedArray.prototype.sort for now. I need to investigate further where those UAFs come from.

@bnoordhuis
Copy link
Contributor Author

Cygwin again!

@bnoordhuis bnoordhuis merged commit dbed7be into quickjs-ng:master Dec 11, 2023
@bnoordhuis bnoordhuis deleted the fix-ta-iter-detach branch December 11, 2023 08:22
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

Successfully merging this pull request may close these issues.

2 participants