From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VfPU3-0004lT-2S for mharc-grub-devel@gnu.org; Sun, 10 Nov 2013 02:30:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfPTw-0004kO-GX for grub-devel@gnu.org; Sun, 10 Nov 2013 02:30:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VfPTr-0003Jk-Uv for grub-devel@gnu.org; Sun, 10 Nov 2013 02:30:52 -0500 Received: from mail-lb0-x236.google.com ([2a00:1450:4010:c04::236]:61869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfPTr-0003JZ-HM for grub-devel@gnu.org; Sun, 10 Nov 2013 02:30:47 -0500 Received: by mail-lb0-f182.google.com with SMTP id w6so2494352lbh.41 for ; Sat, 09 Nov 2013 23:30:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:mime-version :content-type:resent-date:resent-from:subject:resent-message-id :resent-to; bh=ztc8YMdbBFHwLo018gC5S4tbnQuY9qDp7r71qbU86GI=; b=JXPUP8oV0Q3tjiGm5axwX0ODrptP/jw/E506tBVhU/T0YJbsmS+XdRtNO2OnU7BJ0o 2VRFgTMZTD6052fnuBrlSVnm6Fqos7HbsTPJlIzM0vGbTV8htMVl7Xd+vjmg6tzLa0L5 t4nm810JdHpgb98UMX4GJ+iga+vj7gGMBegrtC/JMIw68rJ8T6LeJCfl86CRbPvmlMHX QGcNY9LsaYkYoiQL+t15O0v/2Es37l/H/+hBEEn9gvrCEEUUWzCWbYgdTGm9+pPzZPKV lQ2kCfiZ9ZHhxLQCJMBmMduzEyRxoSCnyXHe7MobYs1VqZUutciAw8eYpeJWFCJoIsA2 6EPA== X-Received: by 10.112.77.169 with SMTP id t9mr17405750lbw.3.1384068646325; Sat, 09 Nov 2013 23:30:46 -0800 (PST) Received: from opensuse.site (ppp91-76-174-89.pppoe.mtu-net.ru. [91.76.174.89]) by mx.google.com with ESMTPSA id ed8sm12343944lbc.11.2013.11.09.23.30.45 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Sat, 09 Nov 2013 23:30:45 -0800 (PST) Date: Sun, 10 Nov 2013 11:24:06 +0400 From: Andrey Borzenkov (by way of Andrey Borzenkov ) To: Andrey Borzenkov Message-ID: <20131110112406.2debc1f7@opensuse.site> In-Reply-To: <20131110093906.08e8c893@opensuse.site> References: <20131108124231.3fa344de@crass-Ideapad-Z570> <527D3373.9020804@gmail.com> <20131108144243.79c1af39@crass-Ideapad-Z570> <20131109081158.2d933f37@opensuse.site> <527E1E64.4010601@gmail.com> <20131109230935.47ce1eaf@crass-Ideapad-Z570> <20131110093906.08e8c893@opensuse.site> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.18; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/QwF91bN20+Pc3z39kfmCI.z"; protocol="application/pgp-signature" Resent-Date: Sun, 10 Nov 2013 11:30:45 +0400 Resent-From: Andrey Borzenkov Subject: Re: __stack_chk_fail in regexp is not defined Resent-Message-ID: <20131110113045.7313fdb5@opensuse.site> Resent-To: grub-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::236 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Nov 2013 07:30:57 -0000 --Sig_/QwF91bN20+Pc3z39kfmCI.z Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =D0=92 Sun, 10 Nov 2013 09:39:06 +0400 Andrey Borzenkov =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > =D0=92 Sat, 9 Nov 2013 23:09:35 -0600 > Glenn Washburn =D0=BF=D0=B8=D1=88=D0=B5=D1= =82: >=20 > > On Sat, 09 Nov 2013 12:37:08 +0100 > > Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: > >=20 > > > On 09.11.2013 05:11, Andrey Borzenkov wrote: > > > > =D0=92 Fri, 8 Nov 2013 14:42:43 -0600 > > > > Glenn Washburn =D0=BF=D0=B8=D1=88=D0= =B5=D1=82: > > > >=20 > > > >> On Fri, 08 Nov 2013 19:54:43 +0100 > > > >> Vladimir '=CF=86-coder/phcoder' Serbinenko wro= te: > > > >> > > > >>> On 08.11.2013 19:42, Glenn Washburn wrote: > > > >>>> Now, I'm getting this error while building. Bug in the awk > > > >>>> script? > > > >>>> > > > >>>> cat syminfo.lst | sort | gawk > > > >>>> -f ./grub.git/grub-core/genmoddep.awk > > > >>>>> moddep.lst || (rm -f moddep.lst; exit 1) __stack_chk_fail in > > > >>>>> regexp is > > > >>>> not defined > > > >>>> > > > >>> What compiler do you use and which additional options did you > > > >>> pass to it? It inserted this function call. We need either to > > > >>> provide this function or inhibit compiler from emiting such calls. > > > >> > > > >> I'm using gcc 4.7 on Ubuntu from the ubuntu-toolchain-r/test ppa. > > > >> I do see a reference to __stack_chk_fail at > > > >> grub-core/efiemu/runtime/efiemu.c:192. It doesn't look like that > > > >> file is generated. Perhaps that function was accidentally added > > > >> to that file? > > > >=20 > > > > It comes from using -fstack-protector GCC option. But configure > > > > should have added -fno-stack-protector in this case. > > > >=20 > > > > Could you check defaults using > > > >=20 > > > > /path/to/your/gcc -Q --help=3Dcommon > > > >=20 > > > > whether it is active by default? Also whether -fno-stack-protector > > > > was used during compilation? > > > >=20 > > > You're right. > > > @Glenn: can you tell us exact version of GRUB (e.g. git commit) and > > > attach config.log? > >=20 > > The commit for these logs is 9612ebc00ef5f186e9084b60ceeb1606d34f1d23. > >=20 > > It looks like stack protector is disabled in gcc and I don't believe > > that -fno-stack-protector is being used. > >=20 >=20 > Check for -fstack-protector is broken (always fails). The problem is this commit: commit 24f4e57c4684471da088c504dec0380886eece0c Author: Vladimir Serbinenko Date: Thu Nov 7 03:17:37 2013 +0100 * configure.ac: Prevent cflags leaking to subsequent tests by always resetting cflags to target_cflags in target tests. It removed restoring of CFLAGS causing leakage of temporary CFLAGS into subsequent tests. This is also broke efiemu tests: efiemu runtime: No (cannot compile with -m64 -mcmodel=3Dlarge -mno-red-zone= -nostdlib) And reason why all tests fail gcc ... -march=3Di386 -m32 -mrtd -mregparm=3D3 -falign-jumps=3D1 -falign-loops=3D1 -falign-functions=3D1 -freg-struct-return -mno-mmx -mno-s= se -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables= -m64 -mcmodel=3Dlarge -mno-red-zone -nostdlib -Wall -W '-I$(top_srcdir)/in= clude' '-I$(top_builddir)/include' -DGRUB_MACHINE_PCBIOS=3D1 -DGRUB_MACHINE= =3DI386_PC -DGRUB_TARGET_CPU_I386=3D1 conftest.c -S -fstack-protector -o co= nftest.s conftest.c:1:0: error: CPU you selected does not support x86-64 instruction= set conftest.c:1:0: error: CPU you selected does not support x86-64 instruction= set conftest.c:1:0: warning: -mregparm is ignored in 64-bit mode [enabled by de= fault] CFLAGS need to be preserved and restored around all compiler flag tests. --Sig_/QwF91bN20+Pc3z39kfmCI.z Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlJ/NJYACgkQR6LMutpd94xoJgCePmrSWSOcxThcOtmcS/GfGymU 4foAn1AWMMfppJTJvme7drS+bZHf53Uk =a96r -----END PGP SIGNATURE----- --Sig_/QwF91bN20+Pc3z39kfmCI.z--