After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 158376 - segfault from gdesklets
segfault from gdesklets
Status: RESOLVED FIXED
Product: libgtop
Classification: Core
Component: linux
unspecified
Other Linux
: Normal normal
: ---
Assigned To: libgtop maintainers
libgtop maintainers
: 160785 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-11-15 15:50 UTC by Havoc Pennington
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Havoc Pennington 2004-11-15 15:50:49 UTC
See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=139342

 Opened by rudolf kastl (che666@uni.de) on 2004-11-15 09:00

Private Comment

Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
build 0.31.1 gdesklets for fc3 (latest rel)
run it with gdb ... segfault... backtrace

Steps to Reproduce:
1. build it and install it
2. gdb python
3. set args /usr/share/gdesklets/gdesklets-daemon
4. run
5. bt ;)

Actual results:
gdb python
GNU gdb Red Hat Linux (6.1post-1.20040607.43rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux-gnu"...(no debugging
symbols found)...Using host libthread_db library
"/lib/tls/libthread_db.so.1".

(gdb) set args /usr/share/gdesklets/gdesklets-daemon
(gdb) run
Starting program: /usr/bin/python /usr/share/gdesklets/gdesklets-daemon
(no debugging symbols found)...(no debugging symbols found)...[Thread
debugging using libthread_db enabled]
[New Thread -151106912 (LWP 10344)]
Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 10344)

  • #0 glibtop_get_netload_s
    from /usr/lib/libgtop-2.0.so.4
  • #1 glibtop_get_netload_l
    from /usr/lib/libgtop-2.0.so.4
  • #2 ??
  • #3 ??
  • #4 PyTuple_New
    from /usr/lib/libpython2.3.so.1.0

Expected results:

no corrupt stack ;))


Additional info:

if you need more information just ask for it ;)


------- Additional Comment #1 From rudolf kastl (che666@uni.de) on 2004-11-15
09:03 -------
Private Comment

version used: libgtop2-2.8.0-1



------- Additional Comment #2 From rudolf kastl (che666@uni.de) on 2004-11-15
09:45 -------
Private Comment

#include <ifaddrs.h>
#include <assert.h>
#include <stdio.h>

int main()
{
        struct ifaddrs *ifa0, *ifr6;

        assert(getifaddrs(&ifa0) == 0);

        for(ifr6 = ifa0; ifr6; ifr6 = ifr6->ifa_next)
        {
                printf("%s\t%p\t%#02x\n",
                       (ifr6->ifa_name ? ifr6->ifa_name : "(null)"),
                       ifr6->ifa_addr,
                       (ifr6->ifa_addr ?
(int)ifr6->ifa_addr->sa_family : -1)
                        );
        }

        return 0;
}


after compiling this case i get the output:
./test2
lo      0x9ba153c       0x11
eth0    0x9ba15c0       0x11
sit0    0x9ba1644       0x11
ppp0    (nil)   0xffffffff
lo      0x9ba174c       0x2
ppp0    0x9ba17d0       0x2
lo      0x9ba1854       0xa
eth0    0x9ba18d8       0xa
Comment 1 che666 2004-11-15 16:00:48 UTC
http://cvs.gnome.org/viewcvs/libgtop/sysdeps/linux/netload.c?sortby=date&r1=1.31&r2=1.32&only_with_tag=MAIN&makepatch=1&diff_format=u

this patch fixes it thats why i opened the bug in the fedora bugzilla not upstream.
Comment 2 Benoît Dejean 2004-11-15 16:05:59 UTC
fixed in CVS HEAD and gnome-2-8
Comment 3 Benoît Dejean 2004-12-08 17:41:05 UTC
*** Bug 160785 has been marked as a duplicate of this bug. ***