prevent core dump when e.out file too large
This commit is contained in:
		
							parent
							
								
									9f9681bf39
								
							
						
					
					
						commit
						40ef304bcf
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -189,9 +189,10 @@ emfile:	<e.out\0> | ||||||
| 	mul	$3,r3		/ or 12	bytes | 	mul	$3,r3		/ or 12	bytes | ||||||
| .endif | .endif | ||||||
| 	add	r3,r0		/ reserve space | 	add	r3,r0		/ reserve space | ||||||
| 	mov	r0,eb		/ top of pd space | 	mov	r0,hp		/ top of pd space, temporarily in hp | ||||||
| 	mov	r0,r3		/ base for data	fill | 	mov	r0,r3		/ base for data	fill | ||||||
| 
 | 
 | ||||||
|  | 	mov	$retsize,eb	/ address of value containing 0, temporarily | ||||||
| 	add	szdata,r0	/ size of external data | 	add	szdata,r0	/ size of external data | ||||||
| 	jcs	toolarge	/ too much text and data | 	jcs	toolarge	/ too much text and data | ||||||
| 	mov	r0,globmax	/ maximum global | 	mov	r0,globmax	/ maximum global | ||||||
|  | @ -200,6 +201,7 @@ emfile:	<e.out\0> | ||||||
| 	sys	indir;sybreak	/ ask for the core
 | 	sys	indir;sybreak	/ ask for the core
 | ||||||
| 	jes	toolarge	/ too much, sorry | 	jes	toolarge	/ too much, sorry | ||||||
| 
 | 
 | ||||||
|  | 	mov	hp,eb		/ top of pd space | ||||||
| 	mov	txtsiz,leescal+4     / set up for text read | 	mov	txtsiz,leescal+4     / set up for text read | ||||||
| 	mov	pb,leescal+2	     / start address text read | 	mov	pb,leescal+2	     / start address text read | ||||||
| 	mov	r5,r0		/ file descriptor input | 	mov	r5,r0		/ file descriptor input | ||||||
|  | @ -1659,7 +1661,7 @@ cfu.z: | ||||||
| .endif | .endif | ||||||
| 	mov	$4,-(sp) | 	mov	$4,-(sp) | ||||||
| 	mov	r1,-(sp) | 	mov	r1,-(sp) | ||||||
| 	jbr	cuu_z | 	jbr	cuu.z | ||||||
| /------- | /------- | ||||||
| cfi.z: | cfi.z: | ||||||
| 	mov	(sp)+,r0 | 	mov	(sp)+,r0 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue