GNOME Bugzilla – Bug 787230
Crash in libgdu
Last modified: 2017-10-10 03:46:07 UTC
Created attachment 359049 [details] gdb full backtrace I don't know if this is the bug someone mentioned when trying to format a disk from nautilus and Disks crashed. Maybe this bug here has another origin. But since it's related to displaying the partition layout in the UI it seems at least relevant even if it's not reliably reproducible.
Created attachment 359050 [details] [review] Fix SIGSEGV in gdu_utils_get_all_contained_objects Fix SIGSEGV in gdu_utils_get_all_contained_objects The variable block_object was used as argument without testing whether it is NULL. The depending code after assignment is now guarded with a if-block.
Review of attachment 359050 [details] [review]: This is not probably anything common, but it might help in some corner cases... ::: src/libgdu/gduutils.c @@ +1174,3 @@ { block_object = (UDisksObject *) g_dbus_interface_dup_object (G_DBUS_INTERFACE (block)); + if (block_object != NULL) nitpick: I would rather add one small block and do not change the alignment of the whole if (partition_table != NULL) block, but it is up to you... if (block != NULL) block_object = (UDisksObject *) g_dbus_interface_dup_object (G_DBUS_INTERFACE (block)); if (block_object != NULL) { objects_to_check = g_list_prepend (objects_to_check, g_object_ref (block_object)); partition_table = udisks_object_get_partition_table (block_object); } if (partition_table != NULL) ...
André, should I include it in the .1 release or today?
Comment on attachment 359050 [details] [review] Fix SIGSEGV in gdu_utils_get_all_contained_objects Push it today, I did not realize that we are not yet in hard code freeze, thanks!
Due to the time shift I already released without ;) It can go to the .1
Found a good way to trigger it: Eject a USB drive which is then not powered of but still present as empty device. Unpluging the drive from the USB port when selected in Disks causes the crash.
*** Bug 788335 has been marked as a duplicate of this bug. ***
*** Bug 788553 has been marked as a duplicate of this bug. ***
*** Bug 788667 has been marked as a duplicate of this bug. ***
*** Bug 757976 has been marked as a duplicate of this bug. ***