Summary: | x11-base/xorg-server-1.11.4 - work/xorg-server-1.11.4/hw/xfree86/modes/xf86EdidModes.c:750:19: error: array subscript is above array bounds | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Kevin Meagher <meagher.kevin> |
Component: | New packages | Assignee: | Gentoo X packagers <x11> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | BatraevEM, corvuscorax, eric.chatellier, esigra, gentoo, madcored, markpariente, n1ghtmare, nbkolchin, nicko.t87, rei4dan |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://lists.x.org/archives/xorg-devel/2011-November/027176.html | ||
See Also: | https://bugs.freedesktop.org/show_bug.cgi?id=45623 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
complete build log
build.log part 1 build.log part 2 |
Description
Kevin Meagher
2012-02-05 21:23:40 UTC
Complete build log is too long to atach The issue is with "-O3" option. It compiles OK with "-O2". I can confirm that it compiles with CFLAGS="-march=core2 -O2 -pipe". Please attach the entire build log file to this bug report. Created attachment 301077 [details]
complete build log
There you go ... (it had to be packed ...)
It's not only reproducible, it's buggy coding. The table where values are taken out of is shorter than the indices used could reach. I.e. it's only 44 elements, but the indices would reach up to 47 elements.
P.S.: The last element in the table contains a "," at the end, which shouldn't be used in inline table definitions for the last element. Looks like some lines were accidentally deleted... Created attachment 301097 [details]
build.log part 1
Created attachment 301099 [details]
build.log part 2
There's an upstream patch here which may be related: http://patchwork.freedesktop.org/patch/7970/ (In reply to comment #5) > Created attachment 301077 [details] > complete build log > > There you go ... (it had to be packed ...) You have never heard of file compression? Next time just run bzip2 on the file. :) (In reply to comment #10) > (In reply to comment #5) > > Created attachment 301077 [details] > > complete build log > > > > There you go ... (it had to be packed ...) > > You have never heard of file compression? Next time just run bzip2 on the file. > :) I meant to refer to comment #7 there. *** Bug 402571 has been marked as a duplicate of this bug. *** The problem seems to only appear in combination with -O3 in CFLAGS. (In reply to comment #9) > There's an upstream patch here which may be related: > http://patchwork.freedesktop.org/patch/7970/ That patch is a little ugly, but it would fix the problem. As a side note, the original code (and the patched code) appear to contain an off-by-one error that prevents the last mode in each group from being added to the server. "j > 0" should be changed to "j >= 0". When I noticed this error, I masked xorg-server-1.11.4 and rebuilt xorg-server-1.11.3 (which I am running as I speak), and got the same errors (literally the same line references to xf86EdidModes.c). So: a) Does it also need to be patched? b) Is a change outside the xorg-server code (some library or something) triggering this, and does it need to be looked at? When I noticed this error, I masked xorg-server-1.11.4 and rebuilt xorg-server-1.11.3 (which I am running as I speak), and got the same errors (literally the same line references to xf86EdidModes.c). So: a) Does it also need to be patched? b) Is a change outside the xorg-server code (some library or something) triggering this, and does it need to be looked at? The patch attached at the "see also" URL works for me (with -O3). https://bugs.freedesktop.org/show_bug.cgi?id=45623 https://bugs.freedesktop.org/show_bug.cgi?id=45623 Seems to me like the cleanest solution! Please add it to -r1. *** Bug 405139 has been marked as a duplicate of this bug. *** This is really a bug. And I have seen it in the version of xorg-server-1.11.3. /var/tmp/portage/x11-base/xorg-server-1.11.3/work/xorg-server-1.11.3/hw/xfree86/modes/xf86EdidModes.c: In function ‘handle_detailed_modes’: /var/tmp/portage/x11-base/xorg-server-1.11.3/work/xorg-server-1.11.3/hw/xfree86/modes/xf86EdidModes.c:750:19: error: array subscript is above array bounds /var/tmp/portage/x11-base/xorg-server-1.11.3/work/xorg-server-1.11.3/hw/xfree86/modes/xf86EdidModes.c:749:19: error: array subscript is above array bounds /var/tmp/portage/x11-base/xorg-server-1.11.3/work/xorg-server-1.11.3/hw/xfree86/modes/xf86EdidModes.c:748:19: error: array subscript is above array bounds /var/tmp/portage/x11-base/xorg-server-1.11.3/work/xorg-server-1.11.3/hw/xfree86/modes/xf86EdidModes.c:747:33: error: array subscript is above array bounds /var/tmp/portage/x11-base/xorg-server-1.11.3/work/xorg-server-1.11.3/hw/xfree86/modes/xf86EdidModes.c:750:19: error: array subscript is above array bounds /var/tmp/portage/x11-base/xorg-server-1.11.3/work/xorg-server-1.11.3/hw/xfree86/modes/xf86EdidModes.c:749:19: error: array subscript is above array bounds /var/tmp/portage/x11-base/xorg-server-1.11.3/work/xorg-server-1.11.3/hw/xfree86/modes/xf86EdidModes.c:748:19: error: array subscript is above array bounds /var/tmp/portage/x11-base/xorg-server-1.11.3/work/xorg-server-1.11.3/hw/xfree86/modes/xf86EdidModes.c:747:33: error: array subscript is above array bounds /var/tmp/portage/x11-base/xorg-server-1.11.3/work/xorg-server-1.11.3/hw/xfree86/modes/xf86EdidModes.c:750:19: error: array subscript is above array bounds /var/tmp/portage/x11-base/xorg-server-1.11.3/work/xorg-server-1.11.3/hw/xfree86/modes/xf86EdidModes.c:749:19: error: array subscript is above array bounds /var/tmp/portage/x11-base/xorg-server-1.11.3/work/xorg-server-1.11.3/hw/xfree86/modes/xf86EdidModes.c:748:19: error: array subscript is above array bounds /var/tmp/portage/x11-base/xorg-server-1.11.3/work/xorg-server-1.11.3/hw/xfree86/modes/xf86EdidModes.c:747:33: error: array subscript is above array bounds make[4]: *** [xf86EdidModes.lo] Ошибка 1 make[4]: *** Ожидание завершения заданий... Submitted Patch solves the problem. (In reply to comment #20) > Submitted Patch solves the problem. I dropped the patch into /etc/portage/patches/x11-base/xorg-server-1.11.4, and the ebuild applies it and builds successfully then. Usable workaround until the patch gets into Portage (or upstream). A workaround was added to xorg-server-1.12.0 For properly fixing this bug, we will see what upstream approves and backport as necessary. Same problem. emerge --info Portage 2.1.10.49 (default/linux/powerpc/ppc32/10.0/desktop/kde, gcc-4.5.3, glibc-2.13-r4, 3.1.5-gentoo ppc) ================================================================= System uname: Linux-3.1.5-gentoo-ppc-7455,_altivec_supported-with-gentoo-2.0.3 Timestamp of tree: Tue, 20 Mar 2012 07:00:02 +0000 distcc 3.1 powerpc-unknown-linux-gnu [enabled] app-shells/bash: 4.2_p20 dev-lang/python: 2.7.2-r3, 3.1.4-r3, 3.2.2 dev-util/cmake: 2.8.6-r4 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.0.3 sys-apps/openrc: 0.9.8.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.5.3-r2 sys-devel/gcc-config: 1.5-r2 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r1 sys-kernel/linux-headers: 3.1 (virtual/os-headers) sys-libs/glibc: 2.13-r4 Repositories: gentoo roslin betagarden ACCEPT_KEYWORDS="ppc" ACCEPT_LICENSE="*" CBUILD="powerpc-unknown-linux-gnu" CFLAGS="-pipe -O2 -mcpu=7450 -mtune=7450 --param l2-cache-size=256 -maltivec -mabi=altivec -fomit-frame-pointer" CHOST="powerpc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-pipe -O2 -mcpu=7450 -mtune=7450 --param l2-cache-size=256 -maltivec -mabi=altivec -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distcc distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS=" http://mirror.yandex.ru/gentoo-distfiles/ http://gentoo.supp.name/" LANG="ru_RU.UTF-8" LC_ALL="ru_RU.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="ru" MAKEOPTS="-j1 -s" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/roslin /var/lib/layman/betagarden" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac aalib acc acl addbookmarks aim akode alias alsa altivec amr aol ass bash-completion berkdb bidi bluetooth branding bs2b bzip2 cairo capi cd cdda cddb cdparanoia cdr chm cifs cleartype cli connectionstatus consolekit contactnotes corefonts cracklib crypt css cups curl cxx daap dbus dc1394 declarative dia dirac divx djvu dri dri2 dts dv dvb dvd dvdr ebook emboss emf enca encode eselect esound exif expat extras faac faad fam fax ffmpeg fftw firefox flac fluidsynth fontconfig fortran ftp g4 gadu gallium gdbm gdu gif gimp git glibc-omitfp glitz glut gmp gmplayer gnutls gpm graphviz gs gstreamer h224 h281 h323 highlight httpd i18n iax ibam iconv icq id3tag idn ieee1394 ifp imagemagick inkjar iphone irc ivr ixj jabber jack jadetex javascript jbig jingle joystick jpeg jpeg2k kate kde kdeenablefinal kipi kpathsea ladspa lame lastfm lcms ldap libass libcaca libkms libnotify libsamplerate libtiger libv4l libv4l2 lid live lto lua lzma lzo mad matroska md5sum mikmod mjpeg mng modplug modules mp3 mp3tunes mp4 mpeg mplayer msn mtp mudflap multimedia musepack musicbrainz mysql nas natspec ncurses netmeeting network networkmanager njb nls nouveau nptl nptlonly nut nuv ogg openal openexr opengl openmp openssl optimisememory optimization oscar pam pango pch pcre pdf perl phonon pipechan plasma plotutils plugins pmu png pnm policykit postproc postscript power powerbook powerpc ppc ppcsha1 ppds pppd private-headers projectm pvr qt3support qt4 quicktime radio raster raw rdesktop readline realrtsp rfc4175 rtmp rtsp samba sametime sane sbc scanner scrobbler sdl session shine shmvideo shout sip sipim skins slang smb smbclient sms sndfile snmp soap socks sox speex spell sql ssl startup-notification stream svg sysfs taglib tcpd telnet tga theora threads tiff timidity tordns transcode translator tray truetype tts twolame udev unicode unrar usb utf8 v4l v4l2 vcd vcdx video video-file video4linux visualization vlm vnc vorbis vpx vxml wav wavpack webkit wifi winpopup wma-fixed wmf x264 xa xanim xcb xcomposite xine xinerama xml xmlrpc xorg xosd xscreensaver xv xvid yahoo yv12 zip zlib zoran zvbi" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau nv" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS same with xorg-server-1.12.0-r1 /mnt/md3/cache/portage/x11-base/xorg-server-1.12.0-r1/work/xorg-server-1.12.0/hw/xfree86/modes/xf86EdidModes.c:750: error: array subscript is above array bounds /mnt/md3/cache/portage/x11-base/xorg-server-1.12.0-r1/work/xorg-server-1.12.0/hw/xfree86/modes/xf86EdidModes.c:749: error: array subscript is above array bounds /mnt/md3/cache/portage/x11-base/xorg-server-1.12.0-r1/work/xorg-server-1.12.0/hw/xfree86/modes/xf86EdidModes.c:748: error: array subscript is above array bounds /mnt/md3/cache/portage/x11-base/xorg-server-1.12.0-r1/work/xorg-server-1.12.0/hw/xfree86/modes/xf86EdidModes.c:747: error: array subscript is above array bounds /mnt/md3/cache/portage/x11-base/xorg-server-1.12.0-r1/work/xorg-server-1.12.0/hw/xfree86/modes/xf86EdidModes.c:750: error: array subscript is above array bounds /mnt/md3/cache/portage/x11-base/xorg-server-1.12.0-r1/work/xorg-server-1.12.0/hw/xfree86/modes/xf86EdidModes.c:749: error: array subscript is above array bounds /mnt/md3/cache/portage/x11-base/xorg-server-1.12.0-r1/work/xorg-server-1.12.0/hw/xfree86/modes/xf86EdidModes.c:748: error: array subscript is above array bounds /mnt/md3/cache/portage/x11-base/xorg-server-1.12.0-r1/work/xorg-server-1.12.0/hw/xfree86/modes/xf86EdidModes.c:747: error: array subscript is above array bounds /mnt/md3/cache/portage/x11-base/xorg-server-1.12.0-r1/work/xorg-server-1.12.0/hw/xfree86/modes/xf86EdidModes.c:750: error: array subscript is above array bounds /mnt/md3/cache/portage/x11-base/xorg-server-1.12.0-r1/work/xorg-server-1.12.0/hw/xfree86/modes/xf86EdidModes.c:749: error: array subscript is above array bounds /mnt/md3/cache/portage/x11-base/xorg-server-1.12.0-r1/work/xorg-server-1.12.0/hw/xfree86/modes/xf86EdidModes.c:748: error: array subscript is above array bounds /mnt/md3/cache/portage/x11-base/xorg-server-1.12.0-r1/work/xorg-server-1.12.0/hw/xfree86/modes/xf86EdidModes.c:747: error: array subscript is above array bounds Upstream has not moved yet, and it seems that sometimes gcc will complain even without -O3 Try adding -Wno-error=array-bounds to CFLAGS if you still see the problem. FYI. This also happens with x11-base/xorg-server-1.11.2-r2 (marked stable as of today). Patch was added in 1.12.2 I'm getting this with 1.11.4-r1 as well. Whatever patch was put in to -r1 isn't working here :-( 1.11.4-r1 is only revbumped for security bug 412609. The patch is in 1.12.2 which will go stable in bug 419473. *** Bug 420127 has been marked as a duplicate of this bug. *** I had the same error (array bounds) compiling xorg-server-1.12.2 with gcc-4.7.1. Switching to gcc-4.6.3 did the trick. (same CFLAGS=-O2) |