After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 711454 - SIGSEGV in gdaemonfile
SIGSEGV in gdaemonfile
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: client module
git master
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2013-11-05 05:29 UTC by Ross Lagerwall
Modified: 2013-11-07 14:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
client: Fix SIGSEGV in fallback copy (959 bytes, patch)
2013-11-05 05:32 UTC, Ross Lagerwall
accepted-commit_now Details | Review

Description Ross Lagerwall 2013-11-05 05:29:21 UTC
If the daemon is killed while in the fallback g_file_copy code:

Program received signal SIGSEGV, Segmentation fault.
0x00007f5b89793ead in g_object_unref (_object=0x0) at gobject.c:3075
3075      old_ref = g_atomic_int_get (&object->ref_count);
(gdb) bt
  • #0 g_object_unref
    at gobject.c line 3075
  • #1 file_transfer
    at gdaemonfile.c line 2972
  • #2 g_daemon_file_copy
    at gdaemonfile.c line 2997
  • #3 g_file_copy
    at gfile.c line 3356
  • #4 g_file_copy
    at gfile.c line 3334

Comment 1 Ross Lagerwall 2013-11-05 05:32:30 UTC
Created attachment 258979 [details] [review]
client: Fix SIGSEGV in fallback copy

If the daemon is killed during the fallback copy, it is possible that
proxy is NULL which causes a segfault when unrefing it.  Use
g_clear_object() instead.
Comment 2 Ondrej Holy 2013-11-07 13:59:26 UTC
Review of attachment 258979 [details] [review]:

Looks good.
Comment 3 Ross Lagerwall 2013-11-07 14:39:54 UTC
Pushed to master as 74e284c7f1bd3377d27250755b3c2fad5a2aa5c8 and stable as 218eb4c46633948ec590922f95368410072dd8e9. Thanks!