Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 112567 - x11-misc/xstroke-0.6 segfaults on amd64
Summary: x11-misc/xstroke-0.6 segfaults on amd64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Krzysztof Pawlik (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-14 17:48 UTC by AJ Armstrong
Modified: 2006-02-11 05:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
xstroke-0.6-sigsegv_sprintf.patch (xstroke-0.6-sigsegv_sprintf.patch,438 bytes, patch)
2005-11-25 17:04 UTC, Krzysztof Pawlik (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description AJ Armstrong 2005-11-14 17:48:45 UTC
Per summary.  Package is not currently amd64 or ~amd64, but there was a
stabilization request.  This bug is the result of attempting to test.

Package builds and installs.  On running, however, it segfaults.

Pertinent output from strace:

open("/etc/xstroke/alphabet", O_RDONLY) = 4
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffff871dc0) = -1 ENOTTY
(Inappropriate ioctl for device)
fstat(4, {st_mode=S_IFREG|0644, st_size=29684, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2aaaabeb0000
read(4, "# alphabet -- xstroke alphabet c"..., 8192) = 8192
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV (core dumped) +++


Portage 2.0.53_rc7 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r3,
2.6.14-gentoo x86_64)
=================================================================
System uname: 2.6.14-gentoo x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.12.0_pre10
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.13
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-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -fweb -ftracer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe -fweb -ftracer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks multilib-strict sandbox sfperms strict
testing"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/etc/portage/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X alsa apache2 audiofile avi berkdb bitmap-fonts bzip2 cddb cdr cli
crypt cups curl dba directfb dts dv dvd dvdr dvdread eds emacs emboss encode esd
exif expat fam fame fbcon ffmpeg firefox foomaticdb gcj gd gdbm gif glut gpm
gstreamer gtk gtk2 idn ieee1394 imagemagick imlib ipv6 java jikes jpeg junit
lcms ldap libwww lirc live lzw lzw-tiff mad mjpeg mng mozilla mp3 mpeg mysql
ncurses nls nptl nptlonly nsplugin nvidia ogg oggvorbis opengl pam pcre pdflib
perl php png python qt quicktime readline real rtc ruby sdl spell ssl tcpd tetex
theora tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales v4l
v4l2 vorbis xine xml2 xmms xpm xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 AJ Armstrong 2005-11-14 20:05:16 UTC
I'm self-marking this invalid, as I'm seeing some indications that the issue may
be with my system, not the package.

Will re-open if I can confirm it's not me.
Comment 2 AJ Armstrong 2005-11-17 18:32:29 UTC
Re-opening, as deltacow (AMD64 AT) is showing the same issue.
Comment 3 Scott Stoddard (RETIRED) gentoo-dev 2005-11-17 18:35:07 UTC
Yup, same here...looks like an attempted write to null pointer.

open("/etc/xstroke/alphabet", O_RDONLY) = 6
ioctl(6, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffff9e8980) = -1 ENOTTY
(Inappropriate ioctl for device)
fstat(6, {st_mode=S_IFREG|0644, st_size=29684, ...}) = 0
mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2aaaabfd0000
read(6, "# alphabet -- xstroke alphabet c"..., 131072) = 29684
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++


delta ~ # emerge --info
Portage 2.0.53_rc7 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r3,
2.6.13-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.13-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.0_pre10
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.13
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-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X alsa audiofile avi berkdb bitmap-fonts browserplugin bzip2 cdr
crypt cups dbus divx4linux dvd dvdread eds emboss encode esd exif expat fam
ffmpeg firefox flac foomaticdb fortran gdbm gif glut gnome gpm gstreamer gtk
gtk2 hal icq idn imagemagick imlib ipv6 jabber java jpeg lcms live lua lzw
lzw-tiff mad mjpeg mng motif mozilla mp3 mpeg msn native ncurses network nls
no-old-linux noantlr nobcel nobeanutils nobsh nptl nptlonly offensive ogg
oggvorbis opengl pam pcre pdflib perl png python qt quicktime radeon readline
real rtc sdk sdl spell sqlite ssl svg tcpd theora tiff transcode truetype
truetype-fonts type1-fonts udev usb userlocales v4l v4l2 vorbis wmf xine xml
xml2 xpm xv xvid xvmc yahoo zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 4 Krzysztof Pawlik (RETIRED) gentoo-dev 2005-11-25 17:04:20 UTC
Created attachment 73615 [details, diff]
xstroke-0.6-sigsegv_sprintf.patch

Could you test attached patch? My quick test on pitr showed that it helps.
Comment 5 Tres 'RiverRat' Melton 2005-12-29 04:26:58 UTC
Ok, I looked at the patch in Comment #4 and it makes no sense to me.  I just can't see how that would make a difference.  If there is not enough memory allocated then more is allocated in response.  Perhaps vsnprintf() returns an unexpected value like the number of bytes written if there isn't enough (I thought that was how snprintf() used to work) but other than that it makes no sense to me.  There is a slight possibility it has something to do with aligned memory moves as 512 is evenly divisable by 16 and 100 is not.  That would require the internals of vsnprintf() to use SSE code for speed which is unlikely.

In any case, I applied the patch and the segv went away.  ???????
Comment 6 Nick Celebic 2006-01-07 12:01:32 UTC
works ok with patch applied. no segfaults.

throws permission errors for logging with unpriveleged user.
Comment 7 Krzysztof Pawlik (RETIRED) gentoo-dev 2006-02-11 05:34:16 UTC
Fixed in -r1.