catch overflow in SVA delays during parsing

* spot/parsetl/scantl.ll: Diagnose delays (##n) larger than
unbounded().  Remove all checks for delays with 1 or 2 characters.
* tests/core/parseerr.test: Add a test case.
* NEWS: Mention this fix.
This commit is contained in:
Alexandre Duret-Lutz 2021-12-02 09:25:59 +01:00
parent 6b46401d36
commit 8ffd06e9a6
3 changed files with 28 additions and 3 deletions

View file

@ -35,6 +35,7 @@ cat >input <<EOF
a - b
{a[*9999999999]}
{a ##[1:255] b}
{a ##255 b}
EOF
run 1 ../ltl2text input |
@ -80,6 +81,11 @@ Closure(@6 #0 [Star(@5 #0 0.. ["a"])])
255 exceeds maximum supported repetition (254)
Closure(@12 #0 [Concat(@11 #0 ["a", Star(@9 #0 0..253 [tt(@1 #0)]), "b"])])
>>> {a ##255 b}
^^^^^
255 exceeds maximum supported repetition (254)
Closure(@17 #0 [Concat(@16 #0 ["a", Star(@15 #0 253..253 [tt(@1 #0)]), "b"])])
EOF
diff output expected