Bug#984953: libgtkmm-3.0-1v5: GParted crashes on Gdk::Pixbuf::get_width() const ()

Bernhard Übelacker bernhardu at mailbox.org
Thu Mar 25 21:22:33 GMT 2021


Dear Maintainer,
I tried to have a look at the core file and a backtrace
with all needed symbols looks like in [1].

In the end it looks like in refresh_combo_devices [2] it
is attempted to load a harddisk icon.

This failed for some reason in [3], therefore a local variable
"theme_icon" contains a null pointer, which gets unconditionally
called member function get_width on and therefore
crashes a few lines later.

A wild guess would be that the harddisk icon file
is missing or is not accessible.
Possibly there is some hint written to stdout before the crash.

Kind regards,
Bernhard


[1]
     (gdb) bt
     #0  Gdk::Pixbuf::gobj (this=0x0) at ../gdkmm/pixbuf.h:389
     #1  Gdk::Pixbuf::get_width (this=0x0) at pixbuf.cc:517
     #2  0x0000aaaaaab89ca4 in GParted::Utils::mk_pixbuf (widget=..., stock_id=..., icon_size=..., icon_size at entry=...) at /usr/include/glibmm-2.4/glibmm/refptr.h:259
     #3  0x0000aaaaaab92020 in GParted::Win_GParted::refresh_combo_devices (this=0xffffffffe960) at /usr/include/gtkmm-3.0/gtkmm/enums.h:2870
     #4  0x0000aaaaaab95980 in GParted::Win_GParted::menu_gparted_refresh_devices (this=<optimized out>) at Win_GParted.cc:1674
     #5  0x0000aaaaaab95e2c in GParted::Win_GParted::initial_device_refresh (data=<optimized out>) at Win_GParted.cc:1605
     #6  0x0000fffff6b8dab4 in g_main_dispatch (context=0xaaaaaaca6f10) at ../../../glib/gmain.c:3325
     #7  g_main_context_dispatch (context=0xaaaaaaca6f10) at ../../../glib/gmain.c:4043
     #8  0x0000fffff6b8de5c in g_main_context_iterate (context=0xaaaaaaca6f10, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at ../../../glib/gmain.c:4119
     #9  0x0000fffff6b8e1b0 in g_main_loop_run (loop=loop at entry=0xaaaaabb23860) at ../../../glib/gmain.c:4317
     #10 0x0000fffff70b98f0 in gtk_main () at ../../../../gtk/gtkmain.c:1328
     #11 0x0000aaaaaab2138c in main (argc=<optimized out>, argv=<optimized out>) at main.cc:62

[2]
     https://gitlab.gnome.org/GNOME/gparted/-/blob/master/src/Win_GParted.cc#L727

[3]
     https://gitlab.gnome.org/GNOME/gparted/-/blob/master/src/Utils.cc#L109
-------------- next part --------------

# Bullseye/testing arm64 qemu VM 2021-03-25

echo "set enable-bracketed-paste off" >> /etc/inputrc; bash
apt update

# to speedup testing
mv /etc/manpath.config /etc/manpath.config.renamed
apt install libeatmydata1
export LD_PRELOAD=/usr/lib/$(uname -m)-linux-gnu/libeatmydata.so

apt dist-upgrade
apt install gdb zstd mc gparted \
        gparted-dbgsym libgtk-3-0-dbgsym libgtkmm-3.0-1v5-dbgsym libglib2.0-0-dbgsym
apt build-dep gparted





mkdir /home/benutzer/source/gparted/orig -p
cd    /home/benutzer/source/gparted/orig
apt source gparted
cd





wget "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=2;bug=984953;filename=gpartedbin.core.tar.zstd;msg=10" -O gpartedbin.core.tar.zstd
tar axf gpartedbin.core.tar.zstd

gdb -q --core gpartedbin.core
gdb -q /usr/sbin/gpartedbin --core gpartedbin.core

set width 0
set pagination off


Core was generated by `/usr/sbin/gpartedbin'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000fffff794d760 in Gdk::Pixbuf::get_width() const () from /usr/lib/aarch64-linux-gnu/libgdkmm-3.0.so.1
[Current thread is 1 (Thread 0xfffff51947a0 (LWP 9937))]
(gdb) set width 0
(gdb) set pagination off
(gdb) bt
#0  0x0000fffff794d760 in Gdk::Pixbuf::get_width() const () from /usr/lib/aarch64-linux-gnu/libgdkmm-3.0.so.1
#1  0x0000aaaaaab89ca4 in ?? ()
#2  0x0000aaaaaab92020 in ?? ()
#3  0x0000aaaaaab95e2c in ?? ()
#4  0x0000fffff6b8dab4 in g_main_context_dispatch () from /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#5  0x0000fffff6b8de5c in ?? () from /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#6  0x0000fffff6b8e1b0 in g_main_loop_run () from /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#7  0x0000fffff70b98f0 in gtk_main () from /usr/lib/aarch64-linux-gnu/libgtk-3.so.0
#8  0x0000aaaaaab2138c in ?? ()
#9  0x0000fffff6707218 in __libc_start_main (main=0xaaaaaab21290, argc=1, argv=0xfffffffff4e8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at ../csu/libc-start.c:308
#10 0x0000aaaaaab219ec in ?? ()
Backtrace stopped: not enough registers or memory available to unwind further


Core was generated by `/usr/sbin/gpartedbin'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  Gdk::Pixbuf::gobj (this=0x0) at ../gdkmm/pixbuf.h:389
389     ../gdkmm/pixbuf.h: No such file or directory.
[Current thread is 1 (Thread 0xfffff51947a0 (LWP 9937))]
(gdb) set width 0
(gdb) set pagination off
(gdb) bt
#0  Gdk::Pixbuf::gobj (this=0x0) at ../gdkmm/pixbuf.h:389
#1  Gdk::Pixbuf::get_width (this=0x0) at pixbuf.cc:517
#2  0x0000aaaaaab89ca4 in GParted::Utils::mk_pixbuf (widget=..., stock_id=..., icon_size=..., icon_size at entry=...) at /usr/include/glibmm-2.4/glibmm/refptr.h:259
#3  0x0000aaaaaab92020 in GParted::Win_GParted::refresh_combo_devices (this=0xffffffffe960) at /usr/include/gtkmm-3.0/gtkmm/enums.h:2870
#4  0x0000aaaaaab95980 in GParted::Win_GParted::menu_gparted_refresh_devices (this=<optimized out>) at Win_GParted.cc:1674
#5  0x0000aaaaaab95e2c in GParted::Win_GParted::initial_device_refresh (data=<optimized out>) at Win_GParted.cc:1605
#6  0x0000fffff6b8dab4 in g_main_dispatch (context=0xaaaaaaca6f10) at ../../../glib/gmain.c:3325
#7  g_main_context_dispatch (context=0xaaaaaaca6f10) at ../../../glib/gmain.c:4043
#8  0x0000fffff6b8de5c in g_main_context_iterate (context=0xaaaaaaca6f10, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at ../../../glib/gmain.c:4119
#9  0x0000fffff6b8e1b0 in g_main_loop_run (loop=loop at entry=0xaaaaabb23860) at ../../../glib/gmain.c:4317
#10 0x0000fffff70b98f0 in gtk_main () at ../../../../gtk/gtkmain.c:1328
#11 0x0000aaaaaab2138c in main (argc=<optimized out>, argv=<optimized out>) at main.cc:62

(gdb) disassemble
Dump of assembler code for function _ZNK3Gdk6Pixbuf9get_widthEv:
=> 0x0000fffff794d760 <+0>:     ldr     x1, [x0]
   0x0000fffff794d764 <+4>:     ldur    x1, [x1, #-24]
   0x0000fffff794d768 <+8>:     add     x0, x0, x1
   0x0000fffff794d76c <+12>:    ldr     x0, [x0, #8]
   0x0000fffff794d770 <+16>:    b       0xfffff793ce80 <gdk_pixbuf_get_width at plt>
End of assembler dump.

(gdb) print $x0
$1 = 0

(gdb) up
#1  Gdk::Pixbuf::get_width (this=0x0) at pixbuf.cc:517
517     pixbuf.cc: No such file or directory.
(gdb) up
#2  0x0000aaaaaab89ca4 in GParted::Utils::mk_pixbuf (widget=..., stock_id=..., icon_size=..., icon_size at entry=...) at /usr/include/glibmm-2.4/glibmm/refptr.h:259
259     inline T_CppObject* RefPtr<T_CppObject>::operator->() const noexcept

(gdb) info local
pixel_size = <optimized out>
theme_icon = {pCppObject_ = 0x0}
width = 24
height = 24

(gdb) up
#3  0x0000aaaaaab92020 in GParted::Win_GParted::refresh_combo_devices (this=0xffffffffe960) at /usr/include/gtkmm-3.0/gtkmm/enums.h:2870
2870      IconSize(BuiltinIconSize size) : size_ (size) {}
(gdb) info local
item = <optimized out>
i = 0
radio_group = {group_ = 0x0}


https://gitlab.gnome.org/GNOME/gparted/-/blob/master/src/Utils.cc#L117
https://gitlab.gnome.org/GNOME/gparted/-/blob/master/src/Win_GParted.cc#L727


More information about the pkg-gnome-maintainers mailing list