On glib, version 2.14.4 every call to functions g_int_hash and g_int_equal result in segmentation fault. Reproducible: Always Steps to Reproduce: Compile and run a program wich has at least one call to g_int_hash or g_int_equal, or simply copy and paste the following code to the terminal window. cat <<EOF > g_int_hash.c #include <glib.h> int main() { g_int_hash(0); return 0; } EOF cat <<EOF > g_int_equal.c #include <glib.h> int main() { g_int_equal(0,0); return 0; } EOF gcc $(pkg-config --cflags --libs glib-2.0) -o g_int_hash g_int_hash.c gcc $(pkg-config --cflags --libs glib-2.0) -o g_int_equal g_int_equal.c ./g_int_hash ./g_int_equal Actual Results: $ ./g_int_hash Segmentation fault $ ./g_int_equal Segmentation falult Each program finishes with segmentation fault Expected Results: Functions should return proper values and two sample programs should exit with code 0. I have done the test with glib, version 2.14.4 Some interesting parts of my emerge --info Portage 2.1.3.19 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r5 i686) ================================================================= System uname: 2.6.23-gentoo-r5 i686 Intel(R) Celeron(R) M processor 1.50GHz Timestamp of tree: Mon, 07 Jan 2008 21:17:01 +0000 app-shells/bash: 3.2_p17-r1 dev-lang/python: 2.4.4-r8, 2.5.1-r5 sys-apps/baselayout: 1.12.10-r5 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="x86" ARCH="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium-m -pipe" CHOST="i686-pc-linux-gnu" CXXFLAGS="-O2 -march=pentium-m -pipe" DISTDIR="/usr/portage/distfiles" ELIBC="glibc" FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" GDK_USE_XFT="1" GDM_LANG="pl_PL.UTF-8" GENTOO_MIRRORS="http://src.gentoo.pl" GTK_MODULES="gnomebreakpad" GTK_RC_FILES="/etc/gtk/gtkrc:/home/kaw/.gtkrc-1.2-gnome2" KERNEL="linux" LANG="pl_PL.UTF-8" LC_ALL="pl_PL.UTF-8" LC_COLLATE="pl_PL.UTF-8" LC_CTYPE="pl_PL.UTF-8" LC_IDENTIFICATION="pl_PL.UTF-8" LC_MEASUREMENT="pl_PL.UTF-8" LC_MESSAGES="en_GB.UTF-8" LC_MONETARY="pl_PL.UTF-8" LC_NUMERIC="en_GB.UTF-8" LC_TELEPHONE="pl_PL.UTF-8" LC_TIME="en_GB.UTF-8" LINGUAS="pl en_GB en" LOGNAME="kwalo" MAKEOPTS="-j2" PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.2:/opt/sun-jdk-1.4.2.14/bin:/opt/sun-jdk-1.4.2.14/jre/bin:/opt/sun-jdk-1.4.2.14/jre/javaws:/usr/qt/3/bin:/usr/games/bin" PKGDIR="/usr/portage/packages" PKG_CONFIG_PATH="/usr/qt/3/lib/pkgconfig" PORTAGE_BIN_PATH="/usr/lib/portage/bin" PORTAGE_CONFIGROOT="/" PORTAGE_DEBUG="0" PORTAGE_DEPCACHEDIR="/var/cache/edb/dep" PORTAGE_ELOG_CLASSES="warn error qa" PORTAGE_ELOG_MAILFROM="portage@localhost" PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}" PORTAGE_ELOG_MAILURI="root" PORTAGE_ELOG_SYSTEM="save" PORTAGE_GID="250" PORTAGE_INST_GID="0" PORTAGE_INST_UID="0" PORTAGE_NICENESS="5" PORTAGE_PYM_PATH="/usr/lib/portage/pym" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_RSYNC_RETRIES="3" PORTAGE_TMPDIR="/var/tmp" PORTAGE_WORKDIR_MODE="0700" PORTDIR="/usr/portage" PYTHONPATH="/usr/lib/portage/pym" USE="X a52 aac acl acpi aiglx alsa asf avahi bash-completion berkdb bitmap-fonts bogofilter branding bzip2 cairo cddb cdr cli cracklib crypt curl dbus dri dvd dvdr dvdread eds emboss encode evo fam ffmpeg firefox flac fortran gdbm gif glitz gnome gnutls gpm gstreamer gtk gtk2 gtkhtml hal iconv ipv6 isdnlog jpeg kerberos ldap libnotify logrotate mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png pppd python qt3support quicktime readline reflection ruby sdl session spell spl sqlite sse sse2 ssl startup-notification svg symlink tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb vcd vidix vorbis x86 xinerama xml xorg xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en_GB en" USERLAND="GNU" VIDEO_CARDS="nv nvidia" USER="kwalo" USERLAND="GNU" USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS APACHE2_MODULES APACHE2_MPMS CAMERAS CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS LIRC_DEVICES MISDN_CARDS USERLAND VIDEO_CARDS" USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND" USE_ORDER="env:pkg:conf:defaults:pkginternal:env.d"
Ouch, I should have looked into the glib code, before I posted this bug. g_int* functions expect pointer to gint, instead of gint. My fault. Anyway, I think that g_int* functions should accept int values, instead of pointers, but I should complain to upstream I suppose. Sorry for problem.