Skip to content

Conversation

@squeek502
Copy link
Member

Before this fix, the added test would fail with something like:

thread 3287298 panic: index out of bounds
/home/ryan/Programming/zig/zig/build/lib/zig/std/zig/tokenizer.zig:408:34: 0x21511f in std.zig.tokenizer.Tokenizer.next (fuzz-debug)
            const c = self.buffer[self.index];
                                 ^
/home/ryan/Programming/zig/zig/build/lib/zig/std/zig/parse.zig:24:37: 0x20af60 in std.zig.parse.parse (fuzz-debug)
        const token = tokenizer.next();
                                    ^

This was found by fuzzing the tokenizer with https://github.com/squeek502/zig-std-lib-fuzzing

(this is just the beginning, there are lots more tokenizer crashes that have been found)

@andrewrk
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants