vm: callstack errors were flipped
							parent
							
								
									0a9d1b03a1
								
							
						
					
					
						commit
						8ab0d12e8d
					
				| 
						 | 
				
			
			@ -49,8 +49,11 @@ IN: kernel.tests
 | 
			
		|||
 | 
			
		||||
: overflow-c ( -- ) overflow-c overflow-c ;
 | 
			
		||||
 | 
			
		||||
! The VM cannot recover from callstack overflow on Windows or
 | 
			
		||||
! OpenBSD, because no facility exists to run memory protection
 | 
			
		||||
! fault handlers on an alternate callstack.
 | 
			
		||||
os [ windows? ] [ openbsd? ] bi or [
 | 
			
		||||
    [ overflow-c ] [ { "kernel-error" 14 f f } = ] must-fail-with
 | 
			
		||||
    [ overflow-c ] [ { "kernel-error" 15 f f } = ] must-fail-with
 | 
			
		||||
] unless
 | 
			
		||||
 | 
			
		||||
[ -7 <byte-array> ] must-fail
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -98,9 +98,9 @@ void factor_vm::memory_protection_error(cell addr, stack_frame *stack)
 | 
			
		|||
	else if(ctx->retainstack_seg->overflow_p(addr))
 | 
			
		||||
		general_error(ERROR_RETAINSTACK_OVERFLOW,false_object,false_object,stack);
 | 
			
		||||
	else if(ctx->callstack_seg->underflow_p(addr))
 | 
			
		||||
		general_error(ERROR_CALLSTACK_UNDERFLOW,false_object,false_object,stack);
 | 
			
		||||
	else if(ctx->callstack_seg->overflow_p(addr))
 | 
			
		||||
		general_error(ERROR_CALLSTACK_OVERFLOW,false_object,false_object,stack);
 | 
			
		||||
	else if(ctx->callstack_seg->overflow_p(addr))
 | 
			
		||||
		general_error(ERROR_CALLSTACK_UNDERFLOW,false_object,false_object,stack);
 | 
			
		||||
	else
 | 
			
		||||
		general_error(ERROR_MEMORY,allot_cell(addr),false_object,stack);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue