Date: Tue, 12 Aug 2008 18:22:16 -0700 (PDT) From: "Ronald F.Guilmette" <rfg@tristatelogic.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: gnu/126488: Compiling with gcc -pg produces immediately crashing executables Message-ID: <20080813012216.48619BDC35@segfault.tristatelogic.com> Resent-Message-ID: <200808130130.m7D1U3mC088142@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 126488 >Category: gnu >Synopsis: Compiling with gcc -pg produces immediately crashing executables >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Aug 13 01:30:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Ronald F. Guilmette >Release: FreeBSD 7.0-RELEASE i386 >Organization: Infinite Monkeys & Co. LLC >Environment: System: FreeBSD 7.0-RELEASE Athlon64 processor (It's an AMD LE-1640B to be precise... single core but 64.) >Description: Compiling & linking just about any program with "gcc -pg" produces either an executable that crashes instantly, just inside of main() or else an executable where the argc and argv values are hopelessly hosed (which can be almost as bad). >How-To-Repeat: Save the following trivial source file as "test.c" and then compile and execute it thusly: gcc -pg -o test test.c ./test #include <stdlib.h> int main (register int const argc, register char **const argv) { if (!argv) { abort (); return 1; } else return 0; } ...then stand back and watch as the program core dumps. >Fix: Beats me. I haven't been working on the compiler in some time now. I'll help to sort this out, but only if you can't find anybody else who's been grunging around in the GCC code more recently than me. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080813012216.48619BDC35>