[Bug 72138] New: Incorrect error handling

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Nov 28 14:25:15 PST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=72138

          Priority: medium
            Bug ID: 72138
          Assignee: telepathy-bugs at lists.freedesktop.org
           Summary: Incorrect error handling
        QA Contact: telepathy-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: seb128 at ubuntu.com
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: mission-control
           Product: Telepathy

Created attachment 89967
  --> https://bugs.freedesktop.org/attachment.cgi?id=89967&action=edit
reset the error to NULL, so the next call is working

That bug exists in 5.16 but doesn't apply to trunk due to some refactoring

Way to trigger it:
- create a user/.local/share/telepathy where the user has no write rights
- try running mission-control
- see the warnings and segfault

Stacktrace
#0  0xb77d1424 in __kernel_vsyscall ()
#1  0xb7039aff in __GI_raise (sig=sig at entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#2  0xb703d083 in __GI_abort () at abort.c:90
#3  0xb7076a95 in __libc_message (do_abort=do_abort at entry=2, 
    fmt=fmt at entry=0xb717a0d0 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:199
#4  0xb70817c2 in malloc_printerr (action=<optimized out>, 
    str=<optimized out>, ptr=0x863b728) at malloc.c:4923
#5  0xb7082510 in _int_free (av=0xb71bb440 <main_arena>, p=0x863b720, 
    have_lock=0) at malloc.c:3779
#6  0xb72265d0 in g_free (mem=mem at entry=0x863b728)
    at /build/buildd/glib2.0-2.38.1/./glib/gmem.c:197
#7  0x08085bdd in _commit (self=self at entry=0x85da000, am=am at entry=0x8638a78, 
    account=account at entry=0x0) at mcd-account-manager-default.c:259
#8  0x08085ec0 in _list (self=0x85da000, am=0x8638a78)
    at mcd-account-manager-default.c:364
#9  0xb7797442 in mcp_account_storage_list (storage=storage at entry=0x85da000, 
    am=am at entry=0x8638a78) at account-storage.c:952
#10 0x0808376e in mcd_storage_load (self=0x8638a78) at mcd-storage.c:740
#11 0x08070937 in _mcd_account_manager_constructed (obj=0x85d8680)
    at mcd-account-manager.c:1682

The code does g_error_free() an error to reuse it, but without resetting it to
NULL, which makes the next call not set a new one and the g_warning hit an
invalid read.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the telepathy-bugs mailing list