]> git.kaiwu.me - njs.git/commit
Fixed njs_vmcode_interpreter() when "toString" conversion fails.
authorDmitry Volyntsev <xeioex@nginx.com>
Mon, 28 Mar 2022 16:22:17 +0000 (16:22 +0000)
committerDmitry Volyntsev <xeioex@nginx.com>
Mon, 28 Mar 2022 16:22:17 +0000 (16:22 +0000)
commit222d6fdcf0c6485ec8e175f3a7b70d650c234b4e
tree310db0e7e70329977387aad745dbce3fce1865df
parent7723f9dc520f08d3a75adf5dac6556503a00ec87
Fixed njs_vmcode_interpreter() when "toString" conversion fails.

Previously, while interpreting a user function, njs_vmcode_interpreter()
might return prematurely when an error happens.  This is not correct
because the current frame has to be unwound (or exception caught)
first.

The fix is exit through only 5 appropriate exit points to ensure
proper unwinding.

This closes #467 issue on Github.
src/njs_vmcode.c
src/test/njs_unit_test.c