It might just be a matter of st.quote being used uninitialised. The patch below seems to make this particular problem go away.
diff --git a/eval.c b/eval.c index 5deca57..4b882c1 100644 --- a/eval.c +++ b/eval.c @@ -201,6 +201,7 @@ expand(const char *cp, /* input word */ make_magic = 0; word = (f&DOBLANK) ? IFS_WS : IFS_WORD; st_head.next = NULL; + st_head.quote = 0; st = &st_head; while (1) {