Skip site navigation (1)Skip section navigation (2)
Date:      06 Apr 1998 14:18:21 -0400
From:      Andrew Hobson <ahobson@eng.mindspring.net>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Optimization bug with gcc 2.7.2 + mktemp
Message-ID:  <kjd8eu24r6.fsf@computer.eng.mindspring.net>

next in thread | raw e-mail | index | archive | help

I'm running -current supped at the beginning of March.

I been having core dumps when using programs that called mktemp(3)
repeatedly.  I finally traced it down to the fact that when I compile
libc with -fomit-frame-pointer, mktemp.c is compiled incorrectly.
Specifially, when _gettemp is called, the third argument (domkdir) is
garbage.  This is "impossible" because _mktemp calls it thusly:

        return(_gettemp(path, (int *)NULL, 0) ? path : (char *)NULL);

I realize it's my own damn fault for compiling with optimization out
the wazoo, but I was wondering if anyone else has had this same
problem.

I haven't seen any warnings about this, so I thought I'd pass it
along.  From browsing the mailing list archives, it seems that patches
have been submitted in the past to make FreeBSD "-fomit-frame-pointer
safe".  Specifically, lib/csu/i386/Makefile explicitly adds
-fno-omit-frame-pointer to CFLAGS.  I don't know if that's the right
answer this time or not.

Drew

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?kjd8eu24r6.fsf>