Summary: | x11-base/xorg-server-1.9.0 build fails "/usr/include/bits/string3.h:52:3: warning: call to __builtin___memcpy_chk will always overflow destination buffer" when built with GCC 4.5 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alex Barbieri <ikandros> |
Component: | Current packages | Assignee: | Gentoo X packagers <x11> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | che, cyrilmaley, kevin.bowling, teidakankan, tetromino |
Priority: | High | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
URL: | https://bugs.freedesktop.org/show_bug.cgi?id=30159 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 259417 | ||
Attachments: |
build log
xorg-server-1.9-fortify-source.patch xorg-server-1.9-fix-VbeModeInfoBlock-memcpy.patch |
Description
Alex Barbieri
2010-09-12 23:02:59 UTC
Created attachment 247071 [details]
build log
Does it build with gcc-4.4? (In reply to comment #2) > Does it build with gcc-4.4? > I'm attempting to build with 4.4 currently. Will update. (In reply to comment #2) > Does it build with gcc-4.4? Yes, for me it builds with gcc-4.4.4-r1. With gcc-4.5.1, I'm getting the same QA error as Alex Barbieri. # emerge --info Portage 2.2_rc80 (default/linux/amd64/10.0/desktop/gnome, gcc-4.5.1, glibc-2.12.1-r1, 2.6.35-gentoo-r5 x86_64) ================================================================= System uname: Linux-2.6.35-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.0.1 Timestamp of tree: Sun, 12 Sep 2010 22:30:01 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] ccache version 2.4 [disabled] app-shells/bash: 4.1_p7 dev-java/java-config: 1.3.7-r1, 2.1.11 dev-lang/python: 2.4.6, 2.5.4-r4, 2.6.5-r3, 3.1.2-r4 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.8.1-r2 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.3 sys-apps/sandbox: 2.3-r1 sys-devel/autoconf: 2.13, 2.67 sys-devel/automake: 1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.16.1-r3, 2.17-r2, 2.18-r4, 2.19.1-r1, 2.20-r1, 2.20.1-r1 sys-devel/gcc: 3.3.6-r1, 3.4.6-r2, 4.1.2, 4.2.4-r1, 4.3.5, 4.4.4-r1, 4.5.1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.81-r2 virtual/os-headers: 2.6.35 (sys-kernel/linux-headers) ABI="amd64" ACCEPT_KEYWORDS="amd64 ~amd64" (In reply to comment #3) > (In reply to comment #2) > > Does it build with gcc-4.4? > > > > I'm attempting to build with 4.4 currently. Will update. > Can confirm - builds with gcc-4.4.4. I suppose this lowers the probability of it being fixed quickly. (In reply to comment #4) I forgot to post my CFLAGS and LDFLAGS: CFLAGS="-march=native -O2 -pipe" CFLAGS_x86="-m32" CXXFLAGS="-march=native -O2 -pipe" LDFLAGS="-Wl,--as-needed -Wl,-O1" LDFLAGS_x86="-m elf_i386 Created attachment 247079 [details, diff]
xorg-server-1.9-fortify-source.patch
Can you try with this patch?
(In reply to comment #7) > Created an attachment (id=247079) [details] > xorg-server-1.9-fortify-source.patch > > Can you try with this patch? Doesn't help. Same QA error with gcc-4.5.1. Created attachment 247093 [details, diff]
xorg-server-1.9-fix-VbeModeInfoBlock-memcpy.patch
Found the problem.
The attached patch fixes some ancient (present in all xorg-server versions since at least 2003!) one-off errors in memcpy in vbe.c that cause gcc-4.5.1 with -O1 or higher optimization level to complain about a potential buffer overflow. With this patch applied, I can emerge xorg-server-1.9.0 with gcc-4.5.1.
Comment on attachment 247079 [details, diff]
xorg-server-1.9-fortify-source.patch
Thank you for the patch. I reported the issue upstream and attached your patch.
It appears that upstream wants the process for submitting patches followed: http://www.x.org/wiki/Development/Documentation/SubmittingPatches If you could submit this patch to xorg-devel mailing list it would be nice. Otherwise I or another x11 team member can do this, but probably I won't have time this week. *** Bug 336883 has been marked as a duplicate of this bug. *** (In reply to comment #11) > If you could submit this patch to xorg-devel mailing list it would be nice. Done, see http://lists.x.org/archives/xorg-devel/2010-September/012920.html Added to main tree. Thanks Alexandre. |