hardinfo crashed with SIGSEGV in free()

Bug #144903 reported by Rafael Sachetto
46
Affects Status Importance Assigned to Milestone
hardinfo (Baltix)
Fix Released
Undecided
Unassigned
hardinfo (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: hardinfo

First pidgin 2.2.0 crashed. Them I had this crash.

ProblemType: Crash
Architecture: i386
Date: Wed Sep 19 15:35:15 2007
DistroRelease: Ubuntu 7.10
ExecutablePath: /usr/bin/hardinfo
NonfreeKernelModules: nvidia
Package: hardinfo 0.4.2.1.svn30042007-1
PackageArchitecture: i386
ProcCmdline: hardinfo
ProcCwd: /home/rafael
ProcEnviron:
 SHELL=/bin/bash
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=pt_BR.UTF-8
Signal: 11
SourcePackage: hardinfo
StacktraceTop:
 free () from /lib/tls/i686/cmov/libc.so.6
 g_free () from /usr/lib/libglib-2.0.so.0
 ?? () from /usr/lib/libglib-2.0.so.0
 ?? ()
 ?? ()
Title: hardinfo crashed with SIGSEGV in free()
Uname: Linux rafael-laptop 2.6.22-12-generic #1 SMP Sun Sep 23 18:11:30 GMT 2007 i686 GNU/Linux
UserGroups: adm admin audio cdrom dialout dip floppy lpadmin netdev plugdev powerdev scanner video

Tags: apport-crash
Revision history for this message
Rafael Sachetto (rsachetto) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Symbolic stack trace

StacktraceTop:free () from /lib/tls/i686/cmov/libc.so.6
IA__g_free (mem=0x83bfe60) at /build/buildd/glib2.0-2.14.1/glib/gmem.c:187
g_hash_node_destroy (hash_node=0x82d8330, key_destroy_func=0,
g_hash_table_foreach_remove_or_steal (hash_table=0x8385d60, func=0xb7d37160 <IA__gtk_true>,
module_selected_show_info (entry=0x8097c50, reload=0) at shell.c:1012

Revision history for this message
Apport retracing service (apport) wrote : Symbolic threaded stack trace
Revision history for this message
Apport retracing service (apport) wrote : Stack trace with source code
Changed in hardinfo:
importance: Undecided → Medium
Revision history for this message
Leandro A. F. Pereira (lafp) wrote :

Could you please test the code in the SVN repository? If you need help compiling the code by yourself just ask me.

Revision history for this message
Rafael Sachetto (rsachetto) wrote :

Can you send me a tar.gz package? My University blocks external svn access...

Revision history for this message
kovi (chodowar) wrote : Re: [Bug 144903] Re: hardinfo crashed with SIGSEGV in free()

no, I install hardinfo from repository...

2007/10/22, Rafael Sachetto <email address hidden>:
>
> Can you send me a tar.gz package? My University blocks external svn
> access...
>
> --
> hardinfo crashed with SIGSEGV in free()
> https://bugs.launchpad.net/bugs/144903
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

Revision history for this message
Gonzalo Núñez (gnunezr) wrote :

Hi.

   Not sure if this solves this issue for you all, in my case it did the trick though.

I modified the file shell.c, near line 1014, from this:

    /* recreate the iter hash table */
    if (!reload) {
        if (update_tbl) {
            g_hash_table_foreach_remove( update_tbl, (GHRFunc)gtk_true, NULL);
        } else {
            update_tbl = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
        }
    }

To this:

    /* recreate the iter hash table */
    if (!reload) {
        if (update_tbl) {
            g_hash_table_foreach_remove( update_tbl, (GHRFunc)gtk_true, NULL);
        } else {
            /*
              GNR - October 24th, 2007.
                Replacing g_hash_table_new_full with g_hash_table_new solves the SIGSEGV
                error!
            */
// update_tbl = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
            update_tbl = g_hash_table_new(g_str_hash, g_str_equal);
        }
    }

That is, I replaced the call to g_hash_table_new_full with a call to g_hash_table_new

I'm no GTK programmer, so I don't know what could be causing the error, as the only difference I see is the calls to g_free for disposing the key/value pairs.

Anyway, hope this helps somebody.

Revision history for this message
Leandro A. F. Pereira (lafp) wrote :

This has been fixed in the latest 0.4.2.3 release.

Revision history for this message
Rafael Sachetto (rsachetto) wrote :

Marking with Fix Releases as this has been fixed in the latest 0.4.2.3 release.

Changed in hardinfo:
status: New → Fix Released
Przemek K. (azrael)
Changed in hardinfo (Baltix):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.