From owner-freebsd-current@FreeBSD.ORG Tue Mar 21 18:40:21 2006 Return-Path: X-Original-To: current@FreeBSD.org 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 40F5816A43B for ; Tue, 21 Mar 2006 18:40:21 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id D57BF43D48 for ; Tue, 21 Mar 2006 18:40:20 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (hvlp8ntx876wpoz2@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.3/8.13.3) with ESMTP id k2LIeKfa098286 for ; Tue, 21 Mar 2006 10:40:20 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.3/8.13.3/Submit) id k2LIeJ0r098285 for current@FreeBSD.org; Tue, 21 Mar 2006 10:40:19 -0800 (PST) (envelope-from jmg) Date: Tue, 21 Mar 2006 10:40:19 -0800 From: John-Mark Gurney To: current@FreeBSD.org Message-ID: <20060321184019.GX35129@funkthat.com> Mail-Followup-To: current@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: Subject: core dumps are HUGE... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 18:40:21 -0000 If someone wants to spend some time investigating this, this looks like an interesting puzzle: -bash-2.05b$ cat t.c int main() { char *p = 0; *p = 5; return 0;} -bash-2.05b$ cc -static -o t t.c -bash-2.05b$ ./t Segmentation fault (core dumped) -bash-2.05b$ ls -l t t.core -rwxr-xr-x 1 jmg jmg 179737 Mar 21 10:36 t -rw------- 1 jmg jmg 50049024 Mar 21 10:36 t.core I first read that as 5megs, but it turns out that it's 50megs in size! A 50 meg core dump for a static program that does nothing? Though I also have questsions about a 179k program file size for something that doesn't call any functions... Now the interesting part is that dynamicly linked: -bash-2.05b$ cc -o t t.c -bash-2.05b$ ./t Segmentation fault (core dumped) -bash-2.05b$ ls -l t t.core -rwxr-xr-x 1 jmg jmg 4615 Mar 21 10:38 t -rw------- 1 jmg jmg 303104 Mar 21 10:38 t.core only 303k... Still on the hefty side of things for a program that just cores, but better than static's 50megs... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."