[Pkg-javascript-devel] Bug#1030284: nodejs: [arm64] RangeError: Maximum call stack size exceeded

Thorsten Glaser tg at debian.org
Thu May 11 23:45:28 BST 2023


James Addison dixit:

>On Thu, 11 May 2023 at 02:43, Andres Salomon <dilinger at queued.net> wrote:

>> For ARM64, he says that raising the stack limit is not safe for v8
>> *embedded inside WebView*, and therefore not appropriate for upstream
>> v8. But then he says it could/should be safe for v8 *embedded inside
>> NodeJS*.
>>
>> Based on that, I suggest patching Debian's NodeJS with the patch to
>> adjust armhf/arm64 stack limit size

That would be a good thing (huh, wasn’t armhf good?), but…

>I have a question: if we apply the patch and begin using the same
>constant stack size of 984kb on 32-bit ARM and 64-bit ARM as is
>defined for other architectures, then does NodeJS on those platforms
>begin supporting exactly the same stack frame capacity (maximum call
>depth for any given recursive function, for example) as a build of the
>same NodeJS source on x86 and amd64 respectively?

… no, because both stack usage and other stuff on stack differ.

Which is why I’d rather have the getrlimit-based one for nodejs.
That would give us twice to four times the limit.

>> (As chromium maintainer, which also embeds v8, I haven't heard of any
>> issues and hadn't planned on touching stacks limits. It sure would be

Yes, yes, definitely don’t change it outside of nodejs.

>> javascript code that is triggering this bug should really be fixed to
>> not be so stack-intensive, of course. Perhaps this bug cloned at a
>> lower severity, filed against those packages that this bug is affecting?

That’s got a dependency chain so long that don’t hold your breath
for ALL those to be changed is true. Besides, how would the
respective maintainers be aware of this in the first place?

Short of failing with an arbitrary nesting limit on all arches,
in upstream nodejs, I doubt you’d get half of the upstream code
maintainers to care… if they even care about their code any more
at all. I am not a friend of such limits either, in addition.

bye,
//mirabilos
-- 
Solange man keine schmutzigen Tricks macht, und ich meine *wirklich*
schmutzige Tricks, wie bei einer doppelt verketteten Liste beide
Pointer XORen und in nur einem Word speichern, funktioniert Boehm ganz
hervorragend.		-- Andreas Bogk über boehm-gc in d.a.s.r



More information about the Pkg-javascript-devel mailing list