* __stack_chk_fail in regexp is not defined @ 2013-11-08 18:42 Glenn Washburn 2013-11-08 18:54 ` Vladimir 'φ-coder/phcoder' Serbinenko 2013-11-08 18:56 ` Vladimir 'φ-coder/phcoder' Serbinenko 0 siblings, 2 replies; 17+ messages in thread From: Glenn Washburn @ 2013-11-08 18:42 UTC (permalink / raw) To: The development of GNU GRUB [-- Attachment #1: Type: text/plain, Size: 222 bytes --] 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 [-- Attachment #2: build-i386-pc.log.xz --] [-- Type: application/x-xz, Size: 51480 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 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-08 18:56 ` Vladimir 'φ-coder/phcoder' Serbinenko 1 sibling, 1 reply; 17+ messages in thread From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-08 18:54 UTC (permalink / raw) To: The development of GNU GRUB [-- Attachment #1: Type: text/plain, Size: 648 bytes --] 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. > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 291 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 2013-11-08 18:54 ` Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-08 20:42 ` Glenn Washburn 2013-11-09 4:11 ` Andrey Borzenkov 0 siblings, 1 reply; 17+ messages in thread From: Glenn Washburn @ 2013-11-08 20:42 UTC (permalink / raw) To: grub-devel [-- Attachment #1: Type: text/plain, Size: 874 bytes --] 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? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 490 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 2013-11-08 20:42 ` Glenn Washburn @ 2013-11-09 4:11 ` Andrey Borzenkov 2013-11-09 11:37 ` Vladimir 'φ-coder/phcoder' Serbinenko 0 siblings, 1 reply; 17+ messages in thread From: Andrey Borzenkov @ 2013-11-09 4:11 UTC (permalink / raw) To: The development of GNU GRUB; +Cc: development [-- Attachment #1: Type: text/plain, Size: 1304 bytes --] В 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? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 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:33 ` Glenn Washburn 0 siblings, 2 replies; 17+ messages in thread From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-09 11:37 UTC (permalink / raw) To: The development of GNU GRUB [-- Attachment #1: Type: text/plain, Size: 1647 bytes --] 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? > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 291 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 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:33 ` Glenn Washburn 1 sibling, 1 reply; 17+ messages in thread From: Glenn Washburn @ 2013-11-10 5:09 UTC (permalink / raw) To: grub-devel [-- Attachment #1.1: Type: text/plain, Size: 1864 bytes --] 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. [-- Attachment #1.2: build-i386-pc.log.xz --] [-- Type: application/x-xz, Size: 51796 bytes --] [-- Attachment #1.3: config-i386-pc.log.xz --] [-- Type: application/x-xz, Size: 38108 bytes --] [-- Attachment #1.4: gcc.help=common.txt --] [-- Type: text/plain, Size: 17885 bytes --] The following options are language-independent: --debug --dump --dump= --dumpbase --dumpdir --extra-warnings --help [disabled] --help=<class> --no-warnings --optimize --output --output= --param <param>=<value> --param= --pedantic --pedantic-errors --profile --target-help --verbose --version -O<number> -Ofast -Os -W -Waggregate-return [disabled] -Warray-bounds [disabled] -Wattributes [enabled] -Wcast-align [disabled] -Wcoverage-mismatch [enabled] -Wcpp [enabled] -Wdeprecated-declarations [enabled] -Wdisabled-optimization [disabled] -Werror [disabled] -Werror= -Wextra [disabled] -Wfatal-errors [disabled] -Wframe-larger-than=<number> -Wfree-nonheap-object [enabled] -Winline [disabled] -Winvalid-memory-model [enabled] -Wlarger-than- -Wlarger-than=<number> -Wmaybe-uninitialized [disabled] -Wmissing-noreturn [disabled] -Woverflow [enabled] -Wpacked [disabled] -Wpadded [disabled] -Wshadow [disabled] -Wstack-protector [disabled] -Wstack-usage= 0xffffffff -Wstrict-aliasing -Wstrict-aliasing= 0xffffffff -Wstrict-overflow -Wstrict-overflow= 0xffffffff -Wsuggest-attribute=const [disabled] -Wsuggest-attribute=noreturn [disabled] -Wsuggest-attribute=pure [disabled] -Wswitch [disabled] -Wswitch-default [disabled] -Wswitch-enum [disabled] -Wsystem-headers [disabled] -Wtrampolines [disabled] -Wtype-limits [enabled] -Wuninitialized [enabled] -Wunreachable-code -Wunsafe-loop-optimizations [disabled] -Wunused [disabled] -Wunused-but-set-parameter [enabled] -Wunused-but-set-variable [enabled] -Wunused-function [enabled] -Wunused-label [enabled] -Wunused-parameter [enabled] -Wunused-value [enabled] -Wunused-variable [enabled] -Wvector-operation-performance [disabled] -aux-info <file> [enabled] -aux-info= -auxbase [enabled] -auxbase-strip -d<letters> -dumpbase <file> [enabled] -dumpdir <dir> [enabled] -fPIC [disabled] -fPIE [disabled] -fabi-version= 0x2 -falign-functions [disabled] -falign-functions= 0x1 -falign-jumps [disabled] -falign-jumps= 0x1 -falign-labels [disabled] -falign-labels= 0x1 -falign-loops [disabled] -falign-loops= 0x1 -fargument-alias -fargument-noalias -fargument-noalias-anything -fargument-noalias-global -fassociative-math [disabled] -fasynchronous-unwind-tables [enabled] -fauto-inc-dec [enabled] -fbounds-check [disabled] -fbranch-count-reg [enabled] -fbranch-probabilities [disabled] -fbranch-target-load-optimize [disabled] -fbranch-target-load-optimize2 [disabled] -fbtr-bb-exclusive [disabled] -fcall-saved-<register> -fcall-used-<register> -fcaller-saves [disabled] -fcheck-data-deps [disabled] -fcombine-stack-adjustments [disabled] -fcommon [enabled] -fcompare-debug-second [disabled] -fcompare-debug[=<opts>] -fcompare-elim [disabled] -fconserve-stack [disabled] -fcprop-registers [disabled] -fcrossjumping [disabled] -fcse-follow-jumps [disabled] -fcse-skip-blocks -fcx-fortran-rules [disabled] -fcx-limited-range [disabled] -fdata-sections [disabled] -fdbg-cnt-list -fdbg-cnt=<counter>:<limit>[,<counter>:<limit>,...] -fdce [enabled] -fdebug-prefix-map= -fdebug-types-section [enabled] -fdefer-pop [disabled] -fdelayed-branch [disabled] -fdelete-null-pointer-checks [enabled] -fdevirtualize [disabled] -fdiagnostics-show-location=[once|every-line] -fdiagnostics-show-option [enabled] -fdisable- -fdse [enabled] -fdump-<type> -fdump-final-insns=filename -fdump-go-spec=filename -fdump-noaddr [disabled] -fdump-passes [disabled] -fdump-unnumbered [disabled] -fdump-unnumbered-links [disabled] -fdwarf2-cfi-asm [enabled] -fearly-inlining [enabled] -feliminate-dwarf2-dups [disabled] -feliminate-unused-debug-symbols [disabled] -feliminate-unused-debug-types [enabled] -femit-class-debug-always [disabled] -fenable- -fexceptions [disabled] -fexcess-precision=[fast|standard] [default] -fexpensive-optimizations [disabled] -ffast-math -ffat-lto-objects [enabled] -ffinite-math-only [disabled] -ffixed-<register> -ffloat-store [disabled] -fforce-addr -fforward-propagate [disabled] -ffp-contract= fast -ffunction-cse [enabled] -ffunction-sections [disabled] -fgcse [disabled] -fgcse-after-reload [disabled] -fgcse-las [disabled] -fgcse-lm [enabled] -fgcse-sm [disabled] -fgnu-tm [disabled] -fgraphite [disabled] -fgraphite-identity [disabled] -fguess-branch-probability [disabled] -fhelp -fhelp= -fident [enabled] -fif-conversion [disabled] -fif-conversion2 [disabled] -findirect-inlining [disabled] -finhibit-size-directive [disabled] -finline [enabled] -finline-atomics [enabled] -finline-functions [disabled] -finline-functions-called-once [disabled] -finline-limit- -finline-limit=<number> -finline-small-functions [disabled] -finstrument-functions [disabled] -finstrument-functions-exclude-file-list= -finstrument-functions-exclude-function-list= -fipa-cp [disabled] -fipa-cp-clone [disabled] -fipa-matrix-reorg [disabled] -fipa-profile [disabled] -fipa-pta [disabled] -fipa-pure-const [disabled] -fipa-reference [disabled] -fipa-sra [disabled] -fipa-struct-reorg -fira-algorithm= CB -fira-loop-pressure [disabled] -fira-region= [default] -fira-share-save-slots [enabled] -fira-share-spill-slots [enabled] -fira-verbose=<number> 0x5 -fivopts [enabled] -fjump-tables [enabled] -fkeep-inline-functions [disabled] -fkeep-static-consts [enabled] -fleading-underscore [enabled] -floop-block [disabled] -floop-flatten [disabled] -floop-interchange [disabled] -floop-optimize -floop-parallelize-all [disabled] -floop-strip-mine [disabled] -flto -flto-compression-level=<number> 0xffffffff -flto-partition=1to1 [disabled] -flto-partition=balanced [disabled] -flto-partition=none [disabled] -flto-report [disabled] -flto= -fmath-errno [enabled] -fmax-errors=<number> 0 -fmem-report [disabled] -fmerge-all-constants [disabled] -fmerge-constants [disabled] -fmerge-debug-strings [enabled] -fmessage-length=<number> -fmodulo-sched [disabled] -fmodulo-sched-allow-regmoves [disabled] -fmove-loop-invariants [enabled] -fnon-call-exceptions [disabled] -fomit-frame-pointer [disabled] -foptimize-register-move [disabled] -foptimize-sibling-calls [disabled] -foptimize-strlen [disabled] -fpack-struct [disabled] -fpack-struct=<number> -fpartial-inlining [disabled] -fpcc-struct-return [disabled] -fpeel-loops [disabled] -fpeephole [enabled] -fpeephole2 [disabled] -fpic [disabled] -fpie [disabled] -fplugin-arg-<name>-<key>[=<value>] -fplugin= -fpost-ipa-mem-report [disabled] -fpre-ipa-mem-report [disabled] -fpredictive-commoning [disabled] -fprefetch-loop-arrays [enabled] -fprofile [disabled] -fprofile-arcs [disabled] -fprofile-correction [disabled] -fprofile-dir= -fprofile-generate -fprofile-generate= -fprofile-use [disabled] -fprofile-use= -fprofile-values [disabled] -frandom-seed -frandom-seed=<string> -freciprocal-math [disabled] -frecord-gcc-switches [disabled] -free [disabled] -freg-struct-return [disabled] -fregmove [disabled] -frename-registers [enabled] -freorder-blocks [disabled] -freorder-blocks-and-partition [disabled] -freorder-functions [disabled] -frerun-cse-after-loop [disabled] -frerun-loop-opt -freschedule-modulo-scheduled-loops [disabled] -frounding-math [disabled] -fsched-critical-path-heuristic [enabled] -fsched-dep-count-heuristic [enabled] -fsched-group-heuristic [enabled] -fsched-interblock [enabled] -fsched-last-insn-heuristic [enabled] -fsched-pressure [disabled] -fsched-pressure-algorithm= weighted -fsched-rank-heuristic [enabled] -fsched-spec [enabled] -fsched-spec-insn-heuristic [enabled] -fsched-spec-load [disabled] -fsched-spec-load-dangerous [disabled] -fsched-stalled-insns [disabled] -fsched-stalled-insns-dep [enabled] -fsched-stalled-insns-dep=<number> -fsched-stalled-insns=<number> -fsched-verbose=<number> 0 -fsched2-use-superblocks [disabled] -fsched2-use-traces -fschedule-insns [disabled] -fschedule-insns2 [disabled] -fsection-anchors [disabled] -fsee -fsel-sched-pipelining [disabled] -fsel-sched-pipelining-outer-loops [disabled] -fsel-sched-reschedule-pipelined [disabled] -fselective-scheduling [disabled] -fselective-scheduling2 [disabled] -fshow-column [enabled] -fshrink-wrap [disabled] -fsignaling-nans [disabled] -fsigned-zeros [enabled] -fsingle-precision-constant [disabled] -fsplit-ivs-in-unroller [enabled] -fsplit-stack [enabled] -fsplit-wide-types [disabled] -fstack-check -fstack-check=[no|generic|specific] -fstack-limit -fstack-limit-register=<register> -fstack-limit-symbol=<name> -fstack-protector [disabled] -fstack-protector-all [disabled] -fstack-usage [disabled] -fstrength-reduce -fstrict-aliasing [disabled] -fstrict-overflow [disabled] -fstrict-volatile-bitfields [enabled] -fsyntax-only [disabled] -ftarget-help -ftest-coverage [disabled] -fthread-jumps [disabled] -ftime-report [disabled] -ftls-model=[global-dynamic|local-dynamic|initial-exec|local-exec] global- dynamic -ftoplevel-reorder [enabled] -ftracer [disabled] -ftrapping-math [enabled] -ftrapv [disabled] -ftree-bit-ccp [disabled] -ftree-builtin-call-dce [disabled] -ftree-ccp [disabled] -ftree-ch [disabled] -ftree-coalesce-inlined-vars [disabled] -ftree-coalesce-vars [enabled] -ftree-copy-prop [disabled] -ftree-copyrename [disabled] -ftree-cselim [enabled] -ftree-dce [disabled] -ftree-dominator-opts [disabled] -ftree-dse [disabled] -ftree-forwprop [enabled] -ftree-fre [disabled] -ftree-loop-distribute-patterns [disabled] -ftree-loop-distribution [disabled] -ftree-loop-if-convert [enabled] -ftree-loop-if-convert-stores [disabled] -ftree-loop-im [enabled] -ftree-loop-ivcanon [enabled] -ftree-loop-linear -ftree-loop-optimize [enabled] -ftree-lrs [disabled] -ftree-parallelize-loops= 0x1 -ftree-partial-pre [disabled] -ftree-phiprop [enabled] -ftree-pre [disabled] -ftree-pta [enabled] -ftree-reassoc [enabled] -ftree-salias -ftree-scev-cprop [enabled] -ftree-sink [disabled] -ftree-slp-vectorize [enabled] -ftree-sra [disabled] -ftree-store-ccp -ftree-store-copy-prop -ftree-switch-conversion [disabled] -ftree-tail-merge [disabled] -ftree-ter [disabled] -ftree-vect-loop-version [enabled] -ftree-vectorize [disabled] -ftree-vectorizer-verbose=<number> -ftree-vrp [disabled] -funit-at-a-time [enabled] -funroll-all-loops [disabled] -funroll-loops [disabled] -funsafe-loop-optimizations [disabled] -funsafe-math-optimizations [disabled] -funswitch-loops [disabled] -funwind-tables [disabled] -fuse-ld=bfd [disabled] -fuse-ld=gold [disabled] -fuse-ld=ld.bfd -fuse-linker-plugin -fvar-tracking [enabled] -fvar-tracking-assignments [enabled] -fvar-tracking-assignments-toggle [disabled] -fvar-tracking-uninit [disabled] -fvariable-expansion-in-unroller [disabled] -fvect-cost-model [enabled] -fverbose-asm [disabled] -fversion -fvisibility=[default|internal|hidden|protected] default -fvpt [disabled] -fweb [enabled] -fwhole-program [disabled] -fwrapv [disabled] -fzee -fzero-initialized-in-bss [enabled] -g -gcoff -gdwarf- 0x2 -ggdb -gno-record-gcc-switches [enabled] -gno-strict-dwarf [disabled] -grecord-gcc-switches [disabled] -gstabs -gstabs+ -gstrict-dwarf [disabled] -gtoggle [disabled] -gvms -gxcoff -gxcoff+ -imultiarch <dir> x86_64-linux-gnu -iplugindir=<dir> -o <file> -p [disabled] -pedantic [disabled] -pedantic-errors [disabled] -quiet [disabled] -v [disabled] -version [disabled] -w [disabled] [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 490 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 2013-11-10 5:09 ` Glenn Washburn @ 2013-11-10 5:39 ` Andrey Borzenkov 2013-11-10 5:53 ` Andrey Borzenkov ` (2 more replies) 0 siblings, 3 replies; 17+ messages in thread From: Andrey Borzenkov @ 2013-11-10 5:39 UTC (permalink / raw) To: grub-devel [-- Attachment #1: Type: text/plain, Size: 2226 bytes --] В 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). Could you test with explicit TARGET_CFLAGS="-Os -fno-stack-protector" (-Os to emulate default behavior)? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 2013-11-10 5:39 ` Andrey Borzenkov @ 2013-11-10 5:53 ` Andrey Borzenkov 2013-11-10 7:24 ` Andrey Borzenkov 2013-11-10 7:35 ` Andrey Borzenkov 2 siblings, 0 replies; 17+ messages in thread From: Andrey Borzenkov @ 2013-11-10 5:53 UTC (permalink / raw) To: grub-devel [-- Attachment #1: Type: text/plain, Size: 2477 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). OK I know what happens (grub checks misuse $ac_compile internal variable and as result mix host and target flags). Need some time to come up with a fix though. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 2013-11-10 5:39 ` Andrey Borzenkov 2013-11-10 5:53 ` Andrey Borzenkov @ 2013-11-10 7:24 ` Andrey Borzenkov 2013-11-10 7:35 ` Andrey Borzenkov 2 siblings, 0 replies; 17+ messages in thread From: Andrey Borzenkov @ 2013-11-10 7:24 UTC (permalink / raw) To: Andrey Borzenkov [-- 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 --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 2013-11-10 5:39 ` Andrey Borzenkov 2013-11-10 5:53 ` Andrey Borzenkov 2013-11-10 7:24 ` Andrey Borzenkov @ 2013-11-10 7:35 ` Andrey Borzenkov 2013-11-10 12:18 ` Vladimir 'φ-coder/phcoder' Serbinenko 2 siblings, 1 reply; 17+ messages in thread From: Andrey Borzenkov @ 2013-11-10 7:35 UTC (permalink / raw) To: grub-devel [-- Attachment #1: Type: text/plain, Size: 3708 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 that do not explicitly reset CFLAGS. 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; or all tests need to explicitly set them. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 2013-11-10 7:35 ` Andrey Borzenkov @ 2013-11-10 12:18 ` Vladimir 'φ-coder/phcoder' Serbinenko 2013-11-10 13:02 ` Andrey Borzenkov 0 siblings, 1 reply; 17+ messages in thread From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-10 12:18 UTC (permalink / raw) To: grub-devel [-- Attachment #1: Type: text/plain, Size: 3939 bytes --] On 10.11.2013 08:35, Andrey Borzenkov wrote: > В 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 that do not explicitly reset CFLAGS. 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; or all tests need to explicitly set them. > Fixed, thanks for spotting those tests. > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 291 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 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 0 siblings, 1 reply; 17+ messages in thread From: Andrey Borzenkov @ 2013-11-10 13:02 UTC (permalink / raw) To: grub-devel [-- Attachment #1: Type: text/plain, Size: 600 bytes --] В Sun, 10 Nov 2013 13:18:41 +0100 Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет: > Fixed, thanks for spotting those tests. if test x"$efiemu_excuse" = x ; then AC_CACHE_CHECK([whether options required for efiemu work], grub_cv_cc_efiemu, [ - CFLAGS="$TARGET_CFLAGS -m64 -mcmodel=large -mno-red-zone -nostdlib" + CFLAGS="$TARGET_CFLAGS -march=core2 -m64 -mcmodel=large -mno-red-zone -nost dlib" That's still wrong. efiemuXX.o does not use TARGET_CFLAGS, this test will always fail on x86 because at this point TARGET_CFLAGS contains -m32 already. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 2013-11-10 13:02 ` Andrey Borzenkov @ 2013-11-10 13:35 ` Vladimir 'φ-coder/phcoder' Serbinenko 0 siblings, 0 replies; 17+ messages in thread From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-10 13:35 UTC (permalink / raw) To: The development of GNU GRUB [-- Attachment #1: Type: text/plain, Size: 944 bytes --] On 10.11.2013 14:02, Andrey Borzenkov wrote: > В Sun, 10 Nov 2013 13:18:41 +0100 > Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет: > >> Fixed, thanks for spotting those tests. > > if test x"$efiemu_excuse" = x ; then > AC_CACHE_CHECK([whether options required for efiemu work], grub_cv_cc_efiemu, > [ > - CFLAGS="$TARGET_CFLAGS -m64 -mcmodel=large -mno-red-zone -nostdlib" > + CFLAGS="$TARGET_CFLAGS -march=core2 -m64 -mcmodel=large -mno-red-zone -nost > dlib" > > That's still wrong. efiemuXX.o does not use TARGET_CFLAGS, this test > will always fail on x86 because at this point TARGET_CFLAGS contains > -m32 already. > in "-m32 -m64" the last one takes precedence. But I'll adjust the test to be nearer to truth. > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 291 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 2013-11-09 11:37 ` Vladimir 'φ-coder/phcoder' Serbinenko 2013-11-10 5:09 ` Glenn Washburn @ 2013-11-10 5:33 ` Glenn Washburn 2013-11-10 5:40 ` Andrey Borzenkov 1 sibling, 1 reply; 17+ messages in thread From: Glenn Washburn @ 2013-11-10 5:33 UTC (permalink / raw) To: grub-devel [-- Attachment #1: Type: text/plain, Size: 1840 bytes --] 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? I can confirm that adding -fno-stack-protector to CFLAGS allows the compile to be successful. So it does indeed seem to be a problem with the configure script. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 490 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 2013-11-10 5:33 ` Glenn Washburn @ 2013-11-10 5:40 ` Andrey Borzenkov 2013-11-10 8:11 ` Glenn Washburn 0 siblings, 1 reply; 17+ messages in thread From: Andrey Borzenkov @ 2013-11-10 5:40 UTC (permalink / raw) To: grub-devel [-- Attachment #1: Type: text/plain, Size: 2227 bytes --] В Sat, 9 Nov 2013 23:33:54 -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? > > I can confirm that adding -fno-stack-protector to CFLAGS allows the > compile to be successful. So it does indeed seem to be a problem with > the configure script. CFLAGS or TARGET_CFLAGS? CFLAGS should not be a problem, it is host tools which should work. It is TARGET_CFLAGS that are needed. If it is fixed by changing CFLAGS, we have another problem ... [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 2013-11-10 5:40 ` Andrey Borzenkov @ 2013-11-10 8:11 ` Glenn Washburn 0 siblings, 0 replies; 17+ messages in thread From: Glenn Washburn @ 2013-11-10 8:11 UTC (permalink / raw) To: grub-devel [-- Attachment #1: Type: text/plain, Size: 2590 bytes --] On Sun, 10 Nov 2013 09:40:58 +0400 Andrey Borzenkov <arvidjaar@gmail.com> wrote: > В Sat, 9 Nov 2013 23:33:54 -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? > > > > I can confirm that adding -fno-stack-protector to CFLAGS allows the > > compile to be successful. So it does indeed seem to be a problem > > with the configure script. > > CFLAGS or TARGET_CFLAGS? CFLAGS should not be a problem, it is host > tools which should work. It is TARGET_CFLAGS that are needed. If it is > fixed by changing CFLAGS, we have another problem ... You may have discovered already the problem, but I wanted to confirm that it was CFLAGS, not TARGET_CFLAGS, that I set to -fno-stack-protector. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 490 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: __stack_chk_fail in regexp is not defined 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 18:56 ` Vladimir 'φ-coder/phcoder' Serbinenko 1 sibling, 0 replies; 17+ messages in thread From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-08 18:56 UTC (permalink / raw) To: grub-devel [-- Attachment #1: Type: text/plain, Size: 501 bytes --] 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 > Can you send me in private relocator.module ? > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 291 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2013-11-10 13:35 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
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).