assertion "!"reached"" failed in pp_xrentry
Seen in specimen sri/lzw-add-with-overflow
of the instigator corpus.
NB: Parse succeeds - this occurs during pretty-printing of the result AST.
Backtrace:
#0 thrkill () at /tmp/-:3
#1 0x21d49e6228681cdd in ?? ()
#2 0x0000039d3c9c92ae in _libc_abort () at /usr/src/lib/libc/stdlib/abort.c:51
#3 0x0000039d3c9e3712 in _libc___assert2 (file=Variable "file" is not available.
)
at /usr/src/lib/libc/gen/assert.c:52
#4 0x0000039b34ce6f11 in pp_xrentry (stream=0x39d3ca6faa8, tok=0x39e0bf6cac8,
indent=22, delta=2) at pdf.c:452
#5 0x0000039d82473140 in h_pprint (stream=0x39d3ca6faa8, tok=0x39e0bf6cac8,
indent=20, delta=2) at build/debug/src/pprint.c:95
#6 0x0000039d82472ffa in h_pprint (stream=0x39d3ca6faa8, tok=0x39d39de7f18,
indent=18, delta=2) at build/debug/src/pprint.c:79
#7 0x0000039d82472ffa in h_pprint (stream=0x39d3ca6faa8, tok=0x39d39de7f98,
indent=16, delta=2) at build/debug/src/pprint.c:79
#8 0x0000039d82472ffa in h_pprint (stream=0x39d3ca6faa8, tok=0x39df84fa018,
indent=14, delta=2) at build/debug/src/pprint.c:79
#9 0x0000039b34ce707d in pp_parseresult (stream=0x39d3ca6faa8,
tok=0x39db8807498, indent=14, delta=2) at pdf.c:472
#10 0x0000039d82473140 in h_pprint (stream=0x39d3ca6faa8, tok=0x39db8807498,
indent=12, delta=2) at build/debug/src/pprint.c:95
#11 0x0000039d82472ffa in h_pprint (stream=0x39d3ca6faa8, tok=0x39db8807518,
indent=10, delta=2) at build/debug/src/pprint.c:79
#12 0x0000039d82472ffa in h_pprint (stream=0x39d3ca6faa8, tok=0x39d3d00bf70,
indent=8, delta=2) at build/debug/src/pprint.c:79
#13 0x0000039d82472ffa in h_pprint (stream=0x39d3ca6faa8, tok=0x39d7be679b0,
indent=6, delta=2) at build/debug/src/pprint.c:79
#14 0x0000039d82472ffa in h_pprint (stream=0x39d3ca6faa8, tok=0x39df5cadcf0,
indent=4, delta=2) at build/debug/src/pprint.c:79
#15 0x0000039d82472ffa in h_pprint (stream=0x39d3ca6faa8, tok=0x39e0cec1130,
indent=2, delta=2) at build/debug/src/pprint.c:79
#16 0x0000039d82472ffa in h_pprint (stream=0x39d3ca6faa8, tok=0x39e0cec1b68,
indent=0, delta=2) at build/debug/src/pprint.c:79
#17 0x0000039d82473189 in h_pprintln (stream=0x39d3ca6faa8, tok=0x39e0cec1b68)
at build/debug/src/pprint.c:103
#18 0x0000039b34cfa717 in main (argc=1, argv=0x7f7ffffd7840) at pdf.c:5167
Context:
#4 0x0000039b34ce6f11 in pp_xrentry (stream=0x39d3ca6faa8, tok=0x39e0bf6cac8,
indent=22, delta=2) at pdf.c:452
452 assert(!"reached");
Current language: auto; currently minimal
(gdb) list
447 case XR_OBJSTM:
448 fprintf(stream, "{ \"type\":\"objstm\", \"stm\":%zu, "
449 "\"idx\":%zu }", xr->o.stm, xr->o.idx);
450 break;
451 default:
452 assert(!"reached");
453 }
454 }
455
456 void
(gdb) list pp_xrentry
430 return NULL;
431 }
432
433 void
434 pp_xrentry(FILE *stream, const HParsedToken *tok, int indent, int delta)
435 {
436 XREntry *xr = H_CAST(XREntry, tok);
437
438 switch (xr->type) {
439 case XR_FREE:
(gdb) print xr->type
$1 = 91