Subject: 8gig core
To: None <tech-kern@netbsd.org>
From: SAITOH Masanobu <masanobu@iij.ad.jp>
List: tech-kern
Date: 08/12/2000 10:33:53
 I saw the cc1 dumping 8gig core on sh3 (native) and i386 (cross for sh3)
while compiling usr.bin/make/job.c. This size is unbelievable.

 Following patch will fixes this problem:

Index: uvm_unix.c
===================================================================
RCS file: /cvsroot/syssrc/sys/uvm/uvm_unix.c,v
retrieving revision 1.15
diff -c -r1.15 uvm_unix.c
*** uvm_unix.c	2000/07/10 13:37:00	1.15
--- uvm_unix.c	2000/08/12 01:24:50
***************
*** 214,222 ****
  
  		if (start >= (vaddr_t)vm->vm_maxsaddr) {
  			flag = CORE_STACK;
- 			start = trunc_page(USRSTACK - ctob(vm->vm_ssize));
- 			if (start >= end)
- 				continue;
  		} else
  			flag = CORE_DATA;
  
--- 214,219 ----


 If the stack is mapped by multiple entries, each entry will produce
it's start address to "stack top" instead of the entry's top.

 Is this patch correct? Y/n

----------------------------------------------------------
		SAITOH Masanobu (masanobu@iij.ad.jp
				  msaitoh@netbsd.org)