From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20146 invoked by alias); 16 Nov 2008 13:49:27 -0000 Received: (qmail 9009 invoked by uid 48); 16 Nov 2008 13:48:04 -0000 Date: Sun, 16 Nov 2008 13:49:00 -0000 Message-ID: <20081116134804.9004.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/38136] vim crashes on startup when compiled with -O3 but works with -O2 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dominique dot pelle at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-11/txt/msg01315.txt.bz2 ------- Comment #7 from dominique dot pelle at gmail dot com 2008-11-16 13:48 ------- reading through the man page of gcc, I stumbled upon this in the section about -O2: ================================================== NOTE: In Ubuntu 8.10 and later versions, -D_FORTIFY_SOURCE=2 is set by default, and is activated when -O is set to 2 or higher. This enables additional compile-time and run-time checks for several libc functions. To disable, specify either -U_FORTIFY_SOURCE or -D_FORTIFY_SOURCE=0. ================================================== So I tried adding compiling with -O3 -D_FORTIFY_SOURCE=0 and it makes it work! So far I don't observe anything wrong with -O3 -D_FORTIFY_SOURCE=0. 'make test' succeeds in every tests. I'm not 100% sure whether adding -D_FORTIFY_SOURCE=0 silents a real bug in vim, or whether it was reporting a spurious error (hence bug in gcc). But even if it silents a spurious bug in this case, adding -D_FORTIFY_SOURCE=0 may also silent other real bugs, which is a shame. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38136