From: Andrey Borzenkov <arvidjaar@gmail.com> (by way of Andrey Borzenkov <arvidjaar@gmail.com>)
To: Andrey Borzenkov <arvidjaar@gmail.com>
Subject: Re: __stack_chk_fail in regexp is not defined
Date: Sun, 10 Nov 2013 11:24:06 +0400 [thread overview]
Message-ID: <20131110112406.2debc1f7@opensuse.site> (raw)
In-Reply-To: <20131110093906.08e8c893@opensuse.site>
[-- Attachment #1: Type: text/plain, Size: 3628 bytes --]
В Sun, 10 Nov 2013 09:39:06 +0400
Andrey Borzenkov <arvidjaar@gmail.com> пишет:
> В Sat, 9 Nov 2013 23:09:35 -0600
> Glenn Washburn <development@efficientek.com> пишет:
>
> > On Sat, 09 Nov 2013 12:37:08 +0100
> > Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> wrote:
> >
> > > On 09.11.2013 05:11, Andrey Borzenkov wrote:
> > > > В Fri, 8 Nov 2013 14:42:43 -0600
> > > > Glenn Washburn <development@efficientek.com> пишет:
> > > >
> > > >> On Fri, 08 Nov 2013 19:54:43 +0100
> > > >> Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> wrote:
> > > >>
> > > >>> 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?
> > > >
> > > > It comes from using -fstack-protector GCC option. But configure
> > > > should have added -fno-stack-protector in this case.
> > > >
> > > > Could you check defaults using
> > > >
> > > > /path/to/your/gcc -Q --help=common
> > > >
> > > > whether it is active by default? Also whether -fno-stack-protector
> > > > was used during compilation?
> > > >
> > > You're right.
> > > @Glenn: can you tell us exact version of GRUB (e.g. git commit) and
> > > attach config.log?
> >
> > The commit for these logs is 9612ebc00ef5f186e9084b60ceeb1606d34f1d23.
> >
> > It looks like stack protector is disabled in gcc and I don't believe
> > that -fno-stack-protector is being used.
> >
>
> Check for -fstack-protector is broken (always fails).
The problem is this commit:
commit 24f4e57c4684471da088c504dec0380886eece0c
Author: Vladimir Serbinenko <phcoder@gmail.com>
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=large -mno-red-zone -nostdlib)
And reason why all tests fail
gcc ... -march=i386 -m32 -mrtd -mregparm=3 -falign-jumps=1
-falign-loops=1 -falign-functions=1 -freg-struct-return -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -m64 -mcmodel=large -mno-red-zone -nostdlib -Wall -W '-I$(top_srcdir)/include' '-I$(top_builddir)/include' -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -DGRUB_TARGET_CPU_I386=1 conftest.c -S -fstack-protector -o conftest.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 default]
CFLAGS need to be preserved and restored around all compiler flag tests.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2013-11-10 7:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 18:42 __stack_chk_fail in regexp is not defined Glenn Washburn
2013-11-08 18:54 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-08 20:42 ` Glenn Washburn
2013-11-09 4:11 ` Andrey Borzenkov
2013-11-09 11:37 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-10 5:09 ` Glenn Washburn
2013-11-10 5:39 ` Andrey Borzenkov
2013-11-10 5:53 ` Andrey Borzenkov
2013-11-10 7:24 ` Andrey Borzenkov [this message]
2013-11-10 7:35 ` Andrey Borzenkov
2013-11-10 12:18 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-10 13:02 ` Andrey Borzenkov
2013-11-10 13:35 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-10 5:33 ` Glenn Washburn
2013-11-10 5:40 ` Andrey Borzenkov
2013-11-10 8:11 ` Glenn Washburn
2013-11-08 18:56 ` Vladimir 'φ-coder/phcoder' Serbinenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131110112406.2debc1f7@opensuse.site \
--to=arvidjaar@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).