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

fix: Re-enable alloc max size test #21059

Merged
merged 2 commits into from
Nov 11, 2023

Conversation

petamoriken
Copy link
Contributor

related #21036

@aapoalas
Copy link
Collaborator

aapoalas commented Nov 2, 2023

Does it pass with one element less? (I mean, is that a valid allocation?)

@petamoriken
Copy link
Contributor Author

petamoriken commented Nov 2, 2023

With one element less, it might depend on the environment. It failed in my environment and the error message has changed.

> new Uint8Array(2 ** 53)
Uncaught RangeError: Invalid typed array length: 9007199254740992
    at new Uint8Array (<anonymous>)
    at <anonymous>:1:22

> new Uint8Array(2 ** 53 - 1)
Uncaught RangeError: Array buffer allocation failed
    at new ArrayBuffer (<anonymous>)
    at new Uint8Array (<anonymous>)
    at <anonymous>:1:22

Copy link
Collaborator

@aapoalas aapoalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@bartlomieju bartlomieju enabled auto-merge (squash) November 11, 2023 08:03
@bartlomieju bartlomieju enabled auto-merge (squash) November 11, 2023 08:03
@bartlomieju bartlomieju merged commit 0c1ab2c into denoland:main Nov 11, 2023
13 checks passed
@petamoriken petamoriken deleted the chore/test-buffer-alloc branch November 12, 2023 12:42
kt3k pushed a commit that referenced this pull request Nov 17, 2023
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.

None yet

3 participants