<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>86335</bug_id>
          
          <creation_ts>2005-03-22 18:12 0000</creation_ts>
          <short_desc>omnibook 2005-02-17: obtest segmentation fault</short_desc>
          <delta_ts>2005-06-12 09:28:53 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>andrewdk@sbcglobal.net</reporter>
          <assigned_to>mobile@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>andrewdk@sbcglobal.net</who>
            <bug_when>2005-03-22 18:12:09 0000</bug_when>
            <thetext>I figure this is a Gentoo bug because obtest is not included with the actual tarball from sf.net.

Normally, on my HP ze4560us, this command will turn off the mute led:

obtest -k 0x94

But it now segfaults. Strange thing is that it happens with the old version as well. Might be some other package that broke it but I can&apos;t pinpoint it. This is the strace:

execve(&quot;/usr/sbin/obtest&quot;, [&quot;obtest&quot;, &quot;-k&quot;, &quot;0x94&quot;], [/* 45 vars */]) = 0
uname({sys=&quot;Linux&quot;, node=&quot;legobrick&quot;, ...}) = 0
brk(0)                                  = 0x804b000
access(&quot;/etc/ld.so.preload&quot;, R_OK)      = -1 ENOENT (No such file or directory)
open(&quot;/etc/ld.so.cache&quot;, O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=102062, ...}) = 0
mmap2(NULL, 102062, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fd0000
close(3)                                = 0
open(&quot;/lib/libc.so.6&quot;, O_RDONLY)        = 3
read(3, &quot;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300P\1&quot;..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1389040, ...}) = 0
mmap2(NULL, 1301692, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e92000
mmap2(0xb7fca000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x137) = 0xb7fca000
mmap2(0xb7fce000, 7356, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fce000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e91000
mprotect(0xb7fca000, 4096, PROT_READ)   = 0
set_thread_area({entry_number:-1 -&gt; 6, base_addr:0xb7e91a90, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xb7fd0000, 102062)              = 0
open(&quot;/dev/urandom&quot;, O_RDONLY)          = 3
read(3, &quot;@\245I\330&quot;, 4)                = 4
close(3)                                = 0
iopl(0x3)                               = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Reproducible: Always
Steps to Reproduce:
1. try to do _anything_ with obtest other than making it give the usage message

Actual Results:  
segfault

Expected Results:  
... No segfault..

Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20050125-r1,
2.6.11-love2 i686)
=================================================================
System uname: 2.6.11-love2 i686 mobile AMD Athlon(tm) XP2500+
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Mar  6 2005, 13:52:53)]
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r6
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS=&quot;x86 ~x86&quot;
AUTOCLEAN=&quot;yes&quot;
CFLAGS=&quot;-O2 -march=athlon-xp -pipe -ftracer -fomit-frame-pointer
-fprefetch-loop-arrays&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/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/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-O2 -march=athlon-xp -pipe -ftracer -fomit-frame-pointer
-fprefetch-loop-arrays&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoaddcvs autoconfig ccache distcc distlocks sandbox sfperms&quot;
GENTOO_MIRRORS=&quot;http://lug.mtu.edu/gentoo/&quot;
LANG=&quot;en_US.utf8&quot;
LC_ALL=&quot;en_US.utf8&quot;
MAKEOPTS=&quot;-j4&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage&quot;
SYNC=&quot;rsync://rsync.namerica.gentoo.org/gentoo-portage&quot;
USE=&quot;x86 3dnow X Xaw3d aalib acpi aim alsa apache2 avi bash-completion berkdb
bitmap-fonts bzip2 cairo cdparanoia cdr crypt cscope cups curl dba dri dvd
emboss encode faad fam flac flash foomaticdb fortran ftp gb gd gdbm gif
gimp-print glx gnome gnutls gphoto2 gpm gstreamer gtk gtk2 gtkhtml hal icq
imagemagick imlib inifile ipv6 jabber jack java jpeg kde ladcca ldap libg++
libwww lzw-tiff mad mbox mikmod mmx mmx2 mng motif mozilla mozsvg mp3 mpeg msn
mysql ncurses nls nptl nptlonly offensive ogg oggvorbis opengl pam pcmcia pdflib
perl php png pthreads python qt quicktime readline real rtc samba sdl silc slang
socks5 spell sqlite sse tcltk tcpd tga theora tiff truetype truetype-fonts
trusted type1-fonts unicode usb userlocales utf8 vorbis wifi wmf wxwindows xft
xine xml xml2 xmms xosd xscreensaver xsl xv xvid yahoo zlib&quot;
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>andrewdk@sbcglobal.net</who>
            <bug_when>2005-03-22 18:20:31 0000</bug_when>
            <thetext>I should also note that it is not a kernel problem as it was working on this and previous kernels sometime before my last emerge -uDv world. I went back a couple kernels, all of which worked before - and all of them segfault now. The old kernels have the 2004 version too - so it must be something else that broke this. I guess that&apos;s what I&apos;m trying to figure out now.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>andrewdk@sbcglobal.net</who>
            <bug_when>2005-03-22 18:25:21 0000</bug_when>
            <thetext>Looking at logfiles this looks like it&apos;s probably a glibc problem.
That or baselayout.

So maybe it should be directed that way - for now I&apos;ll stop spamming my own bug (it&apos;s tricky to get the bug report perfect the first time..)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>andrewdk@sbcglobal.net</who>
            <bug_when>2005-04-29 11:01:54 0000</bug_when>
            <thetext>Created an attachment (id=57592)
patch, fixes segfault

Don&apos;t know why this even worked before, but the &apos;q&apos; variable was never set in
the case of -r, -c, -k, -i, or -s flags - but it was still operated on after
the switch, so that caused a segfault. Moved the iopl check above the switch
and moved the operations on q into the switch. 
Fixes problem.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>genstef@gentoo.org</who>
            <bug_when>2005-06-12 09:28:53 0000</bug_when>
            <thetext>thanks, fixed</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>57592</attachid>
            <date>2005-04-29 11:01 0000</date>
            <desc>patch, fixes segfault</desc>
            <filename>obtest.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC92YXIvdG1wL3BvcnRhZ2Uvb21uaWJvb2stMjAwNTAyMTcvd29yay9vbW5pYm9vay0yMDA1
LTAyLTE3L21pc2Mvb2J0ZXN0L29idGVzdC5jCTIwMDMtMDktMjkgMDM6NDY6NDEuMDAwMDAwMDAw
IC0wNTAwCisrKyBvYnRlc3QuYwkyMDA1LTA0LTI5IDEyOjU3OjE0LjAwMDAwMDAwMCAtMDUwMApA
QCAtMjk3LDEzICsyOTcsMTggQEAKIAlpZiAoc3dbMF0gIT0gJy0nKQogCQl1c2FnZShhcmd2WzBd
KTsKIAorCWlmIChpb3BsKDMpKSB7CisJCXBlcnJvcigiaW9wbCIpOworCQlleGl0ICgxKTsKKwl9
CisKIAlzd2l0Y2ggKHN3WzFdKSB7CiAJCWNhc2UgJ3InOgogCQljYXNlICdjJzoKIAkJY2FzZSAn
ayc6CiAJCWNhc2UgJ2knOgogCQljYXNlICdzJzoKLQkJCWlmIChhcmdjID09IDMpCQorCQkJaWYg
KGFyZ2MgPT0gMykKIAkJCQlwID0gYXJndlsyXTsKIAkJCWVsc2UKIAkJCQl1c2FnZShhcmd2WzBd
KTsKQEAgLTMxMyw2ICszMTgsNyBAQAogCQkJaWYgKGFyZ2MgPT0gNCkgewogCQkJCXAgPSBhcmd2
WzJdOwogCQkJCXEgPSBhcmd2WzNdOworCQkJCWRhdGEgPSBudG9pKHEpOwogCQkJfSBlbHNlCiAJ
CQkJdXNhZ2UoYXJndlswXSk7CiAJCQlicmVhazsKQEAgLTMyMCwxMyArMzI2LDcgQEAKIAkJCXVz
YWdlKGFyZ3ZbMF0pOwogCX0KIAotCWlmIChpb3BsKDMpKSB7Ci0JCXBlcnJvcigiaW9wbCIpOwot
CQlleGl0ICgxKTsKLQl9Ci0KIAlhID0gbnRvaShwKTsKLQlkYXRhID0gbnRvaShxKTsKIAogCXN3
aXRjaCAoc3dbMV0pIHsKIAkJY2FzZSAndyc6Cg==
</data>        

          </attachment>
    </bug>

</bugzilla>