Skip to content

Commit

Permalink
Fixed njs_vmcode_interpreter() when "toString" conversion fails.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
xeioex committed Mar 28, 2022
1 parent 7723f9d commit 222d6fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/njs_vmcode.c
5 changes: 5 additions & 0 deletions src/test/njs_unit_test.c

0 comments on commit 222d6fd

Please sign in to comment.