Bug 139342 - corrupt stack in stock libgtop2 supplied with fc3
corrupt stack in stock libgtop2 supplied with fc3
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: libgtop2 (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Havoc Pennington
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-15 09:00 EST by rudolf kastl
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-15 10:46:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description rudolf kastl 2004-11-15 09:00:39 EST
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)]
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -151106912 (LWP 10344)]
0x009275eb in glibtop_get_netload_s () from /usr/lib/libgtop-2.0.so.4
(gdb) bt
#0  0x009275eb in glibtop_get_netload_s () from /usr/lib/libgtop-2.0.so.4
#1  0x0092268b in glibtop_get_netload_l () from /usr/lib/libgtop-2.0.so.4
#2  0xfefe1610 in ?? ()
#3  0xf6741054 in ?? ()
#4  0x00665234 in PyTuple_New () from /usr/lib/libpython2.3.so.1.0
Previous frame inner to this frame (corrupt stack?)
(gdb)

Expected results:

no corrupt stack ;))


Additional info:

if you need more information just ask for it ;)
Comment 1 rudolf kastl 2004-11-15 09:03:42 EST
version used: libgtop2-2.8.0-1

Comment 2 rudolf kastl 2004-11-15 09:45:41 EST
#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 3 Havoc Pennington 2004-11-15 10:46:56 EST
Reported to http://bugzilla.gnome.org/show_bug.cgi?id=158376

Note You need to log in before you can comment on or make changes to this bug.