]> git.kaiwu.me - njs.git/commit
Change: the default JS stack size is reduced to 64k.
authorDmitry Volyntsev <xeioex@nginx.com>
Thu, 10 Nov 2022 17:33:36 +0000 (09:33 -0800)
committerDmitry Volyntsev <xeioex@nginx.com>
Thu, 10 Nov 2022 17:33:36 +0000 (09:33 -0800)
commit5e9a6d568d8c5f963aaa08937de6d4002d9108e3
treeeaceecdae83a670f3b040655b53e22c6fb3d8882
parent70dedf5b75197ca567e285c61e24b48ecece8da3
Change: the default JS stack size is reduced to 64k.

After 86784a68e8c8 (Computed goto) the size of a stack frame
njs_vmcode_interpreter() when -O0 is specified during compilation
increased significantly.  This might cause system stack overflow for very
deep recursive calls because system stack is exausted faster than JS
stack.

It is possible now to specify JS stack size for CLI.
src/njs.h
src/njs_function.c
src/njs_shell.c
src/njs_vm.c
src/njs_vm.h
src/njs_vmcode.c
src/test/njs_unit_test.c