Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 127712
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Linux Gnome Desktop Team <gnome@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Kyle McFarland <TFKyle@GMail.com>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
testcase.cpp Simple testcase text/plain Kyle McFarland 2006-03-26 22:55 0000 269 bytes Details
glib-2.10.1.ebuild slightly modified glib-2.10.1 ebuild which fixes the issue text/plain Kyle McFarland 2006-03-26 22:59 0000 1.62 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 127712 depends on: Show dependency tree
Bug 127712 blocks: 119872
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-03-26 22:52 0000
in short when --disable-debug is specified explicitly to glibs ./configure it
disables basic data validity checks in some functions in glib, and in some
cases causes segfaults inside of some glib functions if the right values are
sent to them.

To be more specific explicitly specifying --disable-debug causes
G_DISABLE_CHECKS to be defined when compiling glib (search for G_DISABLE_CHECKS
in
http://cvs.gnome.org/viewcvs/glib/configure.in?rev=1.499&only_with_tag=GLIB_2_10_1&view=markup
), which in turn causes g_return_if_fail and g_return_val_if_fail to do nothing
basically (close to the bottom of
http://cvs.gnome.org/viewcvs/glib/configure.in?rev=1.499&only_with_tag=GLIB_2_10_1&view=markup
), some functions inside of glib such as g_utf8_collate use
g_return_val_if_fail to check if the value is NULL before trying to use it in a
way that could cause the program to segfault (in this case attempts to access
(the memory address of the string) - 1 which can break if the string pointer is
NULL)

Simply not using `use_enable debug` but instead `use debug &&
whatever="--enable-debug"` fixes the issue for me

(I'm not sure if this applies to glib <= 2.8 as well, but it looks like it
might)

emerge --info:
Portage 2.1_pre7-r1 (default-linux/x86/2006.0, gcc-4.0.2, glibc-2.4-r1,
2.6.16-gentoo i686)
=================================================================
System uname: 2.6.16-gentoo i686 Intel(R) Pentium(R) 4 CPU 3.20GHz
Gentoo Base System version 1.12.0_pre16
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]
ccache version 2.4 [disabled]
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.3.5, 1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-g -O2 -march=pentium4 -pipe -frerun-loop-opt -floop-optimize2"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env
/usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config
/usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/bind
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo
/etc/texmf/web2c /etc/env.d"
CXXFLAGS="-g -O2 -march=pentium4 -pipe -frerun-loop-opt -floop-optimize2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks fixpackages metadata-transfer sandbox sfperms
splitdebug strict"
GENTOO_MIRRORS="ftp://gentoo.chem.wisc.edu/gentoo/
ftp://gentoo.mirrors.pair.com/ http://gentoo.osuosl.org/
http://distfiles.gentoo.org/ http://mirror.uni-c.dk/pub/gentoo/"
LANG="en_CA.utf8"
LC_ALL="en_CA.utf8"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/fluidportage
/home/kyle/Projects/pub-overlay /usr/local/lila-portage
/home/kyle/Projects/ebuilds /usr/local/portage-gentopia"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X a52 aac aalib acpi adns aim alsa apache2 apm arts audiofile avahi
avi bash-completion bcmath beagle berkdb bitmap-fonts bonobo bzip2 bzlib cairo
cdda cddb cdio cdparanoia cdr cjk cli crypt ctype cups curl curlwrappers dba
dbm dbus dbx dedicated directfb dmi doc dri dts dv dvd dvdr dvdread eds emboss
encode esd ethereal exif expat faad fame fastbuild fbcon ffmpeg firefox flac
font-server foomaticdb force-cgi-redirect fortran freetype ftp gb gd gdbm ggi
gif gimp glx gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal iconv icq
idn imagemagick imlib ipv6 ithreads jabber java joystick jpeg kde latex lcms
libcaca libg++ libgda libwww live mad matroska memlimit mhash mikmod mmap mmx
mng mono motif mp3 mpeg msn nas ncurses nls nntp nptl nptlonly nvidia odbc ogg
oggvorbis openal opengl oss pam pango pcre pdflib perl png portaudio posix
python qt quicktime readline ruby samba sdk sdl session shared simplexml
sndfile soap sockets softmmu speex spell spl sqlite sse sse2 ssl stream svg
svga szip tcltk tcpd theora tiff tokenizer truetype truetype-fonts type1
type1-fonts udev unicode usb utf8 vcd videos vorbis win32codecs wmf wxwindows
xchat xine xinerama xml xml2 xosd xpm xprint xsl xv xvid yahoo zlib elibc_glibc
kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LDFLAGS, LINGUAS

------- Comment #1 From Kyle McFarland 2006-03-26 22:55:03 0000 -------
Created an attachment (id=83210) [details]
Simple testcase

simple testcase that should segfault with USE="-debug"

------- Comment #2 From Kyle McFarland 2006-03-26 22:59:01 0000 -------
Created an attachment (id=83211) [details]
slightly modified glib-2.10.1 ebuild which fixes the issue

thie ebuild won't specify --disable-debug with USE="-debug"

oh, and to compile the above testcase use `g++ -g $(pkg-config --cflags --libs
glib-2.0) testcase.cpp -o testcase` and run it with `./testcase`

------- Comment #3 From Kyle McFarland 2006-03-26 23:02:40 0000 -------
um, to correct myself the second link is supposed to be
http://cvs.gnome.org/viewcvs/glib/glib/gmessages.h?rev=1.29&only_with_tag=GLIB_2_10_1&view=markup,
sorry about that

------- Comment #4 From foser (RETIRED) 2006-03-27 03:37:00 0000 -------
afaik this is not a bug, but intended behaviour when selecting --debug. We
always had a similar configure piece (with comment about it) in the older glib
ebuilds (check existing 2.8), but someone changed it around after that.

This should be fixed, I don't think we should be shipping with --disable-debug,
because it makes debugging as good as impossible. And it should be fixed in a
rev bump.

------- Comment #5 From Saleem Abdulrasool (RETIRED) 2006-03-27 13:16:11 0000 -------
This is a fatal flaw in the build.  Revbump added.  Please sync and test in ~2
hours.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug