Browse code

bytecode_vm: restore stack_id after function return

This allows pointers to local stack variables to work correctly after a call.
Previously stackid was not restored, which caused bytecode_vm to stop bytecodes,
claiming it overrun the stack, when in fact it didn't.
(stackid stores stack size).

Török Edvin authored on 2010/10/18 16:40:44
Showing 1 changed files
... ...
@@ -468,6 +468,7 @@ static always_inline struct stack_entry *pop_stack(struct stack *stack,
468 468
 		    stop = CL_BREAK;\
469 469
 		    continue;\
470 470
 		}\
471
+		stackid = ptr_register_stack(&ptrinfos, values, 0, func->numBytes)>>32;\
471 472
 		inst = &bb->insts[bb_inst];\
472 473
 		break;\
473 474
 	    }