diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-04-29 00:08:55 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-04-29 00:11:02 +0200 |
commit | 86b4863837edbd9aaac1aeea3f0101076ef55f09 (patch) | |
tree | bfab75f75117de86bc805b461c68b05b402818a3 /tests/custom | |
parent | 0e245093909c0445267187b1f396630301965f1a (diff) |
compiler: fix segfault on parsing invalid pre/post increment expressions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/custom')
-rw-r--r-- | tests/custom/03_bugs/15_segfault_on_prefix_increment | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/custom/03_bugs/15_segfault_on_prefix_increment b/tests/custom/03_bugs/15_segfault_on_prefix_increment new file mode 100644 index 0000000..280b680 --- /dev/null +++ b/tests/custom/03_bugs/15_segfault_on_prefix_increment @@ -0,0 +1,18 @@ +When parsing an invalid pre- or post-decrement expression as first +statement of a source buffer, the compiler crashed while attempting +to look up the type of the previous instruction within a not-yet +allocated chunk buffer. + +-- Expect stderr -- +Syntax error: Unterminated string +In line 1, byte 6: + + `{% ++"` + ^-- Near here + + +-- End -- + +-- Testcase -- +{% ++" +-- End -- |