additional fix for #24

Use xalloca() to allocate a stack.