[Xfce-bugs] [Bug 5892] New: invalid call to free()

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Wed Oct 21 18:11:00 CEST 2009


http://bugzilla.xfce.org/show_bug.cgi?id=5892

           Summary: invalid call to free()
    Classification: Xfce
           Product: Libxfcegui4
           Version: 4.6.1
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Medium
         Component: General
        AssignedTo: xfce-bugs at xfce.org
        ReportedBy: stick at gk2.sk


I believe I've found a race condition during the first Xfce launch.

When there are no files in user's home directory xfwm4 crashes with these
error:

*** glibc detected *** xfwm4: free(): invalid pointer: 0x080de928 ***
======= Backtrace: =========
/lib/libc.so.6[0xb754c50b]
/lib/libc.so.6(cfree+0xd9)[0xb7551049]
/usr/lib/libglib-2.0.so.0(g_free+0x36)[0xb77e3916]
/usr/lib/libxfce4kbd-private.so.5[0xb7ea22c7]
/usr/lib/libgobject-2.0.so.0(g_object_newv+0x9ca)[0xb787913a]
/usr/lib/libgobject-2.0.so.0(g_object_new_valist+0x34a)[0xb787966a]
/usr/lib/libgobject-2.0.so.0(g_object_new+0x70)[0xb7879780]
/usr/lib/libxfce4kbd-private.so.5(xfce_shortcuts_provider_new+0x36)[0xb7ea1b96]
xfwm4[0x807cceb]
xfwm4[0x806ae93]
/lib/libc.so.6(__libc_start_main+0xfe)[0xb74f5ace]
xfwm4[0x80503e1]

When I run xfwm4 from console it starts and any subsequents Xfce starts are OK
(with xfwm4).

I tracked the problem deeper and the invalid free() call happens here:
http://git.xfce.org/xfce/libxfcegui4/tree/libxfce4kbd-private/xfce-shortcuts-provider.c?id=xfce-4.6.1#n299
(g_free() at line 299)

I'm no GLib expert, so I created a workaround and it works (no xfwm4 crash at
first start) - see attachment. Is the fix OK or it should be fixed in another
way? Thanks!

-- 
Configure bugmail: http://bugzilla.xfce.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Xfce-bugs mailing list