From owner-freebsd-hackers Mon Jan 17 15:58:27 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from aspirin.bulnet.com (ns1.bulnet.com [212.124.82.3]) by hub.freebsd.org (Postfix) with ESMTP id D4D3F14F89 for ; Mon, 17 Jan 2000 15:58:20 -0800 (PST) (envelope-from ian@bulinfo.net) Received: from cserv.oksys.bg (root@ppp12.bulnet.com [212.124.82.39]) by aspirin.bulnet.com (8.9.3/8.9.3) with ESMTP id BAA20357 for ; Tue, 18 Jan 2000 01:54:43 +0200 Received: from bulinfo.net (ian@localhost [127.0.0.1]) by cserv.oksys.bg (8.9.3/8.9.3) with ESMTP id BAA15236 for ; Tue, 18 Jan 2000 01:58:02 +0200 (EET) (envelope-from ian@bulinfo.net) Message-ID: <3883AC8A.7A6F7D5F@bulinfo.net> Date: Tue, 18 Jan 2000 01:58:02 +0200 From: Iani Brankov Organization: ok systems X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.0.36 i386) X-Accept-Language: en MIME-Version: 1.0 To: hackers@freebsd.org Subject: The stack size for a process? Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, after making world of a CURRENT cvsupped yesterday, one of my applications stopped working because of a Segmentation fault. The C procedure where the problem pops has about 64k local variables. here's the assembly output of the procedure's beginning: 0x805bb60 : pushl %ebp 0x805bb61 : movl %esp,%ebp 0x805bb63 : subl $0x1000c,%esp 0x805bb69 : pushl %edi The Segmentation fault happens when the process tries to push %edi in the stack, which has been just decreased by 0x1000c. here's the stack in the beginning of main(): esp 0xbfbfd744 ss 0x27 and after the fault: esp 0xbfacae68 ss 0x27 If I decrease the size of the local vars, it goes ok. It's interesting, because I made a simple test using 640k local vars, and it worked! void ab() { char buf[655360]; buf[0] = 0; buff[655359] = 0; } main () { ab(); } --iani To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message