# HG changeset patch # User William Astle # Date 1660777590 21600 # Node ID f3018ed5e30eac5d41f256719540d099c3bf3d7d # Parent 5fb1110c043f7ee908d9e9bf37a7184a65156a59 Fix listing to not rely on undefined memory before the start of instab This is exactly the same bug that affected symbol value registration and was fixed in changeset 65c2085e0398. This time, fix it when creating listings. diff -r 5fb1110c043f -r f3018ed5e30e lwasm/list.c --- a/lwasm/list.c Wed Aug 17 17:05:01 2022 -0600 +++ b/lwasm/list.c Wed Aug 17 17:06:30 2022 -0600 @@ -181,7 +181,7 @@ else { lw_expr_t te; - if (instab[cl -> insn].flags & lwasm_insn_setdata) + if ((cl -> insn >= 0) && (instab[cl -> insn].flags & lwasm_insn_setdata)) te = lw_expr_copy(cl -> daddr); else te = lw_expr_copy(cl -> addr);