From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 17 06:47:08 2014 Received: (at submit) by debbugs.gnu.org; 17 Jun 2014 10:47:08 +0000 Received: from localhost ([127.0.0.1]:49987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wwqux-0002Su-Rs for submit@debbugs.gnu.org; Tue, 17 Jun 2014 06:47:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57558) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wwqut-0002SN-AD for submit@debbugs.gnu.org; Tue, 17 Jun 2014 06:47:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wwqun-0002XB-5W for submit@debbugs.gnu.org; Tue, 17 Jun 2014 06:46:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwqun-0002Ws-3G for submit@debbugs.gnu.org; Tue, 17 Jun 2014 06:46:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwqum-0004ac-30 for bug-grep@gnu.org; Tue, 17 Jun 2014 06:46:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wwqul-0002WN-8t for bug-grep@gnu.org; Tue, 17 Jun 2014 06:46:56 -0400 Received: from ipmail04.adl6.internode.on.net ([2001:44b8:8060:ff02:300:1:6:4]:50752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwquk-0002V8-Ug for bug-grep@gnu.org; Tue, 17 Jun 2014 06:46:55 -0400 Received: from ppp118-210-242-75.lns20.adl6.internode.on.net (HELO [192.168.1.1]) ([118.210.242.75]) by ipmail04.adl6.internode.on.net with ESMTP; 17 Jun 2014 20:16:38 +0930 Message-ID: <53A01C8D.9090800@grouse.com.au> Date: Tue, 17 Jun 2014 20:16:37 +0930 From: behoffski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: bug-grep@gnu.org Subject: Gentoo gcc 4.8.3 build problem: -fstack-protector [also, Re: bug#17754] Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) G'day, [Re: bug#17754: There is a bugfix in 4.8.3 regarding code flow analysis that covers the reported case. Now that Gentoo has added gcc 4.8.3 to its package database, I've rebuilt, and the compiler now correctly detects that the variable will always be initialised before it is used. The unwanted behaviour in gcc 4.8.2 was part of the new "-Og" feature.] ---- New potential portability problem: When Gentoo released their repackaged gcc 4.8.3 (in the last 48 hours or so), they also released a warning NEWS item regarding gcc 4.8.3 defaulting to -fstack-protector, and gcc 4.9 onwards defaulting to -fstack-protector-strong: 2014-06-15-gcc48_ssp Title GCC 4.8.3 defaults to -fstack-protector Author Ryan Hill Posted 2014-06-15 Revision 1 Beginning with GCC 4.8.3, Stack Smashing Protection (SSP) will be enabled by default. The 4.8 series will enable -fstack-protector while 4.9 and later enable -fstack-protector-strong. [...] [...] these features [...] can be disabled with -fno-stack-protector. I've just installed gcc 4.8.3, and have found that the -fstack-protector feature results in a compilation error in lib/mbsstr.c: In file included from mbsstr.c:32:0: str-kmp.h: In function 'knuth_morris_pratt': str-kmp.h:35:1: error: stack protector not protecting local variables: variable length buffer [-Werror=stack-protector] knuth_morris_pratt (const UNIT *haystack, ^ mbsstr.c: In function 'knuth_morris_pratt_multibyte': mbsstr.c:40:1: error: stack protector not protecting local variables: variable length buffer [-Werror=stack-protector] knuth_morris_pratt_multibyte (const char *haystack, const char *needle, ^ cc1: all warnings being treated as errors Re-running './configure CFLAGS="-Og -fsanitize=address -fno-stack-protector" results in a clean build, and "make check" passes. On a slightly-related note, Valgrind and -fsanitize=address are incompatible (overlapping memory space usage). Configuring with "CFLAGS=-Og -fno-stack-protector" (no "-fsanitize=address") lets "make check" run successfully with Jim's Valgrind scripts referencing built images in grep/src/.vg-tmp/. cheers, behoffski (Brenton Hoff) Programmer, Grouse Software From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 17 15:29:13 2014 Received: (at 17793-done) by debbugs.gnu.org; 17 Jun 2014 19:29:13 +0000 Received: from localhost ([127.0.0.1]:50903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wwz4C-0005yh-J9 for submit@debbugs.gnu.org; Tue, 17 Jun 2014 15:29:12 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:51732) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wwz47-0005yD-NK for 17793-done@debbugs.gnu.org; Tue, 17 Jun 2014 15:29:08 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id EAC5239E8012; Tue, 17 Jun 2014 12:29:01 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xhSx2JyY-MuO; Tue, 17 Jun 2014 12:28:57 -0700 (PDT) Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id C029239E8008; Tue, 17 Jun 2014 12:28:57 -0700 (PDT) Message-ID: <53A096F6.9030206@cs.ucla.edu> Date: Tue, 17 Jun 2014 12:28:54 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: behoffski , 17793-done@debbugs.gnu.org Subject: Re: bug#17793: Gentoo gcc 4.8.3 build problem: -fstack-protector [also, Re: bug#17754] References: <53A01C8D.9090800@grouse.com.au> In-Reply-To: <53A01C8D.9090800@grouse.com.au> Content-Type: multipart/mixed; boundary="------------050407090208020804090607" X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 17793-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is a multi-part message in MIME format. --------------050407090208020804090607 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit behoffski wrote: > In file included from mbsstr.c:32:0: > str-kmp.h: In function 'knuth_morris_pratt': > str-kmp.h:35:1: error: stack protector not protecting local > variables: variable length buffer [-Werror=stack-protector] > knuth_morris_pratt (const UNIT *haystack, > ^ These warnings don't indicate any bugs in the code; they're merely about incomplete run-time checking in the underlying implementation. I was particularly amused by a refusal to compile a function on the grounds that its code doesn't use the stack! So let's just disable the warnings. I pushed the attached patch. > Valgrind and -fsanitize=address are incompatible Thanks, I didn't know that. Too bad, but understandable. Neither tool dominates the other, so I guess we'll have to use them separately. --------------050407090208020804090607 Content-Type: text/plain; charset=UTF-8; name="0001-build-avoid-Wstack-protector.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0001-build-avoid-Wstack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ICAgbnc9IiRudyAtV3ZsYSIg ICAgICAgICAgICAgICAgICAgICMgd2FybmluZ3MgaW4gZ2V0dGV4dC5oCisgIG53PSIkbncg LVdzdGFjay1wcm90ZWN0b3IiICAgICAgICAjIGdlbmVyYXRlcyBmYWxzZSBhbGFybXMgZm9y IHVzZWZ1bCBjb2RlCiAgIG53PSIkbncgLVdzd2l0Y2gtZGVmYXVsdCIgICAgICAgICAjIFRv byBtYW55IHdhcm5pbmdzIGZvciBub3cKICAgbnc9IiRudyAtV3Vuc2FmZS1sb29wLW9wdGlt aXphdGlvbnMiICMgT0sgdG8gc3VwcHJlc3MgdW5zYWZlIG9wdGltaXphdGlvbnMKICAgbnc9 IiRudyAtV2lubGluZSIgICAgICAgICAgICAgICAgICMgc3RyZXEuaCdzIHN0cmVxNCwgc3Ry ZXE2IGFuZCBzdHJjYXNlZXE2Ci0tIAoxLjkuMwoK --------------050407090208020804090607-- From unknown Sun Aug 17 10:17:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 16 Jul 2014 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator