kernel: limit stacktrace depth to 50.
- Unlikely to discard useful information and avoids long
    system lockups on machines configured to print system output to serial.
			
			
This commit is contained in:
		
							parent
							
								
									3c6274b8be
								
							
						
					
					
						commit
						515e8d075f
					
				@ -251,6 +251,7 @@ PUBLIC void proc_stacktrace(struct proc *whichproc)
 | 
			
		||||
{
 | 
			
		||||
	reg_t v_bp, v_pc, v_hbp;
 | 
			
		||||
	int iskernel;
 | 
			
		||||
	int n = 0;
 | 
			
		||||
 | 
			
		||||
	v_bp = whichproc->p_reg.fp;
 | 
			
		||||
 | 
			
		||||
@ -279,6 +280,8 @@ PUBLIC void proc_stacktrace(struct proc *whichproc)
 | 
			
		||||
			break;
 | 
			
		||||
		}
 | 
			
		||||
		v_bp = v_hbp;
 | 
			
		||||
		if(n++ > 50)
 | 
			
		||||
			break;
 | 
			
		||||
	}
 | 
			
		||||
	printf("\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user