From owner-freebsd-hackers Sun Jun 6 12:13:10 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from Hydro.CAM.ORG (Hydro.CAM.ORG [198.168.100.7]) by hub.freebsd.org (Postfix) with ESMTP id E1509150F5 for ; Sun, 6 Jun 1999 12:13:08 -0700 (PDT) (envelope-from intmktg@CAM.ORG) Received: from Ocean.CAM.ORG (Ocean.CAM.ORG [198.168.100.5]) by Hydro.CAM.ORG (8.8.8/8.8.4) with ESMTP id PAA17954 for ; Sun, 6 Jun 1999 15:13:01 -0400 (EDT) Date: Sun, 6 Jun 1999 15:13:07 -0400 (EDT) From: Marc Tardif To: freebsd-hackers@freebsd.org Subject: a.out behavior Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The following code should obviously segfault: #include #include char buffer[4028]; void main() { int i; for (i=0; i<=4028; i++) buffer[i]='A'; syslog(LOG_ERR, buffer); } Now here's the problem: When compiling with "gcc file.c", the program segfaults. When compiling with "gcc -o file file.c", the program doesn't segfault. Both files are nevertheless identical, apart from the name of the temporary object file name which could be made the same (search for cc00, perhaps). I'm using freebsd 2.2.5, gcc 2.7.2.1. Someone please let me know what's so special about a.out. Thanks in advance, Marc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message