From owner-freebsd-current@FreeBSD.ORG Fri Jan 2 04:14:44 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 27A1E16A4CE for ; Fri, 2 Jan 2004 04:14:44 -0800 (PST) Received: from freebee.digiware.nl (dsl144.iae.nl [212.61.62.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id D788943D31 for ; Fri, 2 Jan 2004 04:14:41 -0800 (PST) (envelope-from wjw@withagen.nl) Received: from dual (dual [212.61.27.71]) by freebee.digiware.nl (8.12.10/8.12.9) with SMTP id i02CFs8A033156; Fri, 2 Jan 2004 13:15:55 +0100 (CET) (envelope-from wjw@withagen.nl) Message-ID: <029c01c3d12a$2488c2c0$471b3dd4@dual> From: "Willem Jan Withagen" To: , Date: Fri, 2 Jan 2004 13:15:42 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: Strange calloc problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2004 12:14:44 -0000 I'm running this compiler which is rather heap intensive and it crashed with a SigFault in calloc/malloc (I've tied both, but as expected calloc calls malloc) What suggestions are there further to track this down to the real problem. Giving that calloc/malloc should at least print something if it understands the error I expect heap corruption. No flags set in /etc/malloc.conf --WjW Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libc.so.5...done. Loaded symbols for /lib/libc.so.5 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x281e1f53 in memset () from /lib/libc.so.5 (gdb) bt #0 0x281e1f53 in memset () from /lib/libc.so.5 #1 0x00000110 in ?? () #2 0x281e0ea4 in tcflow () from /lib/libc.so.5 #3 0x281e1286 in malloc () from /lib/libc.so.5 #4 0x281dda91 in calloc () from /lib/libc.so.5 #5 0x0804d4ab in ast2beg_StdProc (o=0x812a460, t=0x8148de4) at std2beg.c:253 #6 0x0804a333 in ast2beg (t=0x8148e78) at ast2beg.c:766 #7 0x08049b49 in ast2beg (t=0x814a7f0) at ast2beg.c:502 #8 0x080496e6 in ast2beg (t=0x814b098) at ast2beg.c:351 #9 0x080491d1 in main (argc=4, argv=0xbfbfeaf8) at pas.c:109 #10 0x08048e42 in _start () (gdb) frame 4 #4 0x281dda91 in calloc () from /lib/libc.so.5 (gdb) up #5 0x0804d4ab in ast2beg_StdProc (o=0x812a460, t=0x8148de4) at std2beg.c:253 253 char *fname = calloc(1,flen+1); (gdb) p flen $1 = 13