]> git.kaiwu.me - njs.git/commit
Fixed break instruction in a try-catch block.
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 29 Jun 2022 06:04:00 +0000 (23:04 -0700)
committerDmitry Volyntsev <xeioex@nginx.com>
Wed, 29 Jun 2022 06:04:00 +0000 (23:04 -0700)
commit404553896792b8f5f429dc8852d15784a59d8d3e
tree5f9688ae71fb58f454cc45a7c7d7003ca630ca60
parent6886970b7925c521dc7e835b1a3f2585b7190748
Fixed break instruction in a try-catch block.

Previously, JUMP offset for a break instruction inside a try-catch
block was not set to a correct offset during code generation
when a return instruction was present in inner try-catch block.

The fix is to update the JUMP offset appropriately.

This closes #553 issue on Github.
src/njs_generator.c
src/test/njs_unit_test.c