This code:
set I0, 0 FOO: set S0, I0 savec S0 inc I0 lt I0, 256, FOO rotate_up 2 restore S1 print S1 print "\n" end makes Parrot segfault. This seems to be due to an off-by-one error in stack_entry(..) that uncovers itself if depth==chunk->used. Enclosed patch fixes; test to follow shortly. Simon --- stacks.c.old Sun Mar 24 17:39:32 2002 +++ stacks.c Sun Mar 24 17:40:10 2002 @@ -76,7 +76,7 @@ } else { chunk = stack_base->prev; /* Start at top */ - while (offset > chunk->used && chunk != stack_base) { + while (offset >= chunk->used && chunk != stack_base) { offset -= chunk->used; chunk = chunk->prev; }