Comment 7 for bug 1143463

Revision history for this message
In , Sebastien Bacher (seb128) wrote :

Created attachment 89967
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@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@entry=2,
    fmt=fmt@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@entry=0x863b728)
    at /build/buildd/glib2.0-2.38.1/./glib/gmem.c:197
#7 0x08085bdd in _commit (self=self@entry=0x85da000, am=am@entry=0x8638a78,
    account=account@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@entry=0x85da000,
    am=am@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.