| author | |
| committer | |
| log | 5d1f855a2c560a2fc10a05ce9cb59e0865e8bff4 |
| tree | 88426053fe8d34ef257036476627282aa06b9914 |
| parent | 3744bd2004110f418e09f9e61ee195ba9c20dc5b |
| signature |
3 files changed, 33 insertions(+), 2 deletions(-)
fuzz/crashes/id:000000,sig:06,src:000000,time:1399,execs:755,op:quick,pos:149 created+31| ... | @@ -0,0 +1,31 @@ | ||
| 1 | id: g982zq6e8wsvnmduerpbf8787hu85brugmngn8wf | ||
| 2 | name: yaml | ||
| 3 | main: yaml.zig | ||
| 4 | license: MIT | ||
| 5 | description: A Yaml parser built on top of libyaml | ||
| 6 | dependencies: | ||
| 7 | a - src: git https://github.com/yaml/libyaml tag-0.2.5 | ||
| 8 | id: 8mdbh0zuneb0i3hs5jby5je0heem1i6yxusl7c8y8qx68hqc | ||
| 9 | license: MIT | ||
| 10 | c_include_dirs: | ||
| 11 | - include | ||
| 12 | c_source_flags: | ||
| 13 | - -DYAML_VERSION_MAJOR=0 | ||
| 14 | - -DYAML_VERSION_MINOR=2 | ||
| 15 | - -DYAML_VERSION_PATCH=5 | ||
| 16 | - -DYAML_VERSION_STRING="0.2.5" | ||
| 17 | - -DYAML_DECLARE_STATIC=1 | ||
| 18 | c_source_files: | ||
| 19 | - src/api.c | ||
| 20 | - src/dumper.c | ||
| 21 | - src/emitter.c | ||
| 22 | - src/loader.c | ||
| 23 | - src/parser.c | ||
| 24 | - src/reader.c | ||
| 25 | - src/scanner.c | ||
| 26 | - src/writer.c | ||
| 27 | |||
| 28 | - src: git https://github.com/nektro/zig-extras | ||
| 29 | |||
| 30 | root_dependencies: | ||
| 31 | - src: git https://github.com/nektro/zig-expect | ||
test.zig+1| ... | @@ -22,6 +22,7 @@ fn fuzzCase(embedfile_content: []const u8) void { | ... | @@ -22,6 +22,7 @@ fn fuzzCase(embedfile_content: []const u8) void { |
| 22 | test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:2049,execs:911,op:quick,pos:263")); } | 22 | test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:2049,execs:911,op:quick,pos:263")); } |
| 23 | test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:6342,execs:4701,op:arith8,pos:55,val:+3")); } | 23 | test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:6342,execs:4701,op:arith8,pos:55,val:+3")); } |
| 24 | test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:1310,execs:717,op:quick,pos:97")); } | 24 | test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:1310,execs:717,op:quick,pos:97")); } |
| 25 | test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:1399,execs:755,op:quick,pos:149")); } | ||
| 25 | // zig fmt: on | 26 | // zig fmt: on |
| 26 | 27 | ||
| 27 | fn parseTest(comptime basename: [:0]const u8) !void { | 28 | fn parseTest(comptime basename: [:0]const u8) !void { |
yaml.zig+1-2| ... | @@ -376,8 +376,7 @@ fn get_event_string(event: Token, p: *const Parser) ![:0]u8 { | ... | @@ -376,8 +376,7 @@ fn get_event_string(event: Token, p: *const Parser) ![:0]u8 { |
| 376 | const lines = p.lines; | 376 | const lines = p.lines; |
| 377 | if (sm.line != em.line) { | 377 | if (sm.line != em.line) { |
| 378 | const starter = lines[sm.line][sm.column..]; | 378 | const starter = lines[sm.line][sm.column..]; |
| 379 | if (starter.len > 1 and starter[0] == '"') return error.YamlInvalidMultilineString; | 379 | if (starter.len != 1) return error.YamlInvalidMultilineString; |
| 380 | std.debug.assert(starter.len == 1); | ||
| 381 | switch (starter[0]) { | 380 | switch (starter[0]) { |
| 382 | '|' => { | 381 | '|' => { |
| 383 | var list = std.ArrayList(u8).init(p.alloc); | 382 | var list = std.ArrayList(u8).init(p.alloc); |