You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's nothing in the language spec that requires engines to have an array that long; however, Array.from({ length: 67108865 }) also fails in both node 24 and chrome, so it might be a v8-specific regression?
Okay. Are we thinking that resolves this issue? Or is a stepping stone and the array limit should eventually be increased to 2**32-1 (or some other value)?
Activity
ljharb commentedon May 6, 2025
There's nothing in the language spec that requires engines to have an array that long; however,
Array.from({ length: 67108865 })also fails in both node 24 and chrome, so it might be a v8-specific regression?juanarbol commentedon May 6, 2025
It is definitely a V8 engine issue.
juanarbol commentedon May 6, 2025
I think there is a misunderstanding here."a".repeat(kTimes)returns a single string with"a....aaaa-kTimes"; that is a single element.The issue is not about the number of elements but its size in memory.NVM, I think I found the issue from the V8 engine.
v8/v8@0c36aff
That commit just messes around with the Array length and it was introduced to the V8 v13.x-series
RafaelGSS commentedon May 6, 2025
Maybe related https://github.com/RafaelGSS/nodejs-bench-operations/actions/runs/14866441608/job/41744580099. This benchmark runs successfully on all previous Node.js versions except v24.
Test updates for Node.js v18 removal and v24 support
indus commentedon Oct 2, 2025
I think it is this commit: v8/v8@298c285#diff-de4a87761282d00872530bdaa015b6f4e6407bf6b553ee7919a4f85f6f460812L32
It cuts the max length almost in half.
It hurts my work a lot - but I'm unsure how to get in contact with the V8 team.
[array] Improve JSArray capacity changes
LeszekSwirski commentedon Oct 2, 2025
Once Node catches up to https://chromium-review.googlesource.com/c/v8/v8/+/6597277, you'll get double the max size again (more than it used to be even).
targos commentedon Nov 14, 2025
Cherry-pick of that commit to v24.x: #60713
rotu commentedon Nov 14, 2025
@targos, so what does that change do? will the new max array size still be less than 2**32-1?
targos commentedon Nov 14, 2025
It will be at 2**27 (like Node.js 25).
rotu commentedon Nov 14, 2025
Okay. Are we thinking that resolves this issue? Or is a stepping stone and the array limit should eventually be increased to 2**32-1 (or some other value)?