diff options
author | Florian Westphal <fw@strlen.de> | 2023-06-19 22:43:03 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-06-20 21:44:52 +0200 |
commit | bb16416ec82599e41043a52887c37157e6f61984 (patch) | |
tree | c3e4f05777ef2cd8f6719f703a7dadf13ed232ca /tests | |
parent | 75217cb7bb78e22fc9317116353149def8a306e9 (diff) |
parser: don't assert on scope underflows
close_scope() gets called from the object destructors;
imbalance can cause us to hit assert().
Before:
nft: parser_bison.y:88: close_scope: Assertion `state->scope > 0' failed.
After:
assertion3:4:7-7: Error: too many levels of nesting jump {
assertion3:5:8-8: Error: too many levels of nesting jump
assertion3:5:9-9: Error: syntax error, unexpected newline, expecting '{'
assertion3:7:1-1: Error: syntax error, unexpected end of file
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/shell/testcases/bogons/nft-f/scope_underflow_assert | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/shell/testcases/bogons/nft-f/scope_underflow_assert b/tests/shell/testcases/bogons/nft-f/scope_underflow_assert new file mode 100644 index 00000000..aee1dcbf --- /dev/null +++ b/tests/shell/testcases/bogons/nft-f/scope_underflow_assert @@ -0,0 +1,6 @@ +table t { + chain c { + jump{ + jump { + jump + |