Stream: compiler development

Topic: zig compiler - parser - fuzz failure 010


view this post on Zulip Luke Boswell (Mar 10 2025 at 03:51):

How would you expect this to parse? It's coming up as an issue because the formatting isn't stable.

~~~META
description=fuzz crash
~~~SOURCE
H{o,
    ]

foo =

    "on        (string 'onmo %')))
~~~PROBLEMS
check.parse.tokenize.Diagnostic.Tag.AsciiControl
check.parse.tokenize.Diagnostic.Tag.MismatchedBrace
check.parse.tokenize.Diagnostic.Tag.UnclosedString
~~~FORMATTED
H

{ o }

foo = "on        (string 'onmo %')))"
~~~TOKENS
UpperIdent,OpenCurly,LowerIdent,Comma,Newline,CloseCurly,Newline,LowerIdent,OpAssign,Newline,StringStart,StringPart,EndOfFile
~~~PARSE
(file
    (malformed 'missing_header')
    (tag 'H')
    (record (field 'o'))
    (decl
        (ident 'foo')
        (string 'on        (string 'onmo %')))')))
====== expected this output: =========
H

{ o }

foo = "on"␃

======== instead found this: =========
H

o

foo = "on"␃

======================================

view this post on Zulip Anthony Bullard (Mar 10 2025 at 13:38):

If there are problems, we shouldn't proceed with this input


Last updated: Jul 06 2025 at 12:14 UTC