[Interest] ASAN (Qt 6.4 + Glib) build shows stackoverflow in trivial Qt program

Thiago Macieira thiago.macieira at intel.com
Thu Nov 10 20:40:08 CET 2022


On Thursday, 10 November 2022 00:23:52 PST Dennis Luehring wrote:
>      #1 0x7f08b15289a1 in g_object_get_valist ../glib/gobject/gobject.c:2659
>      #2 0x7f08b1529029 in g_object_get ../glib/gobject/gobject.c:2754
>      #3 0x7f08b3eee24b in gtkSetting<bool>

template <typename T>
static T gtkSetting(const gchar *propertyName)
{
    GtkSettings *settings = gtk_settings_get_default();
    T value;
    g_object_get(settings, propertyName, &value, NULL);
    return value;
}

The GLib line is:

      G_VALUE_LCOPY (&value, var_args, 0, &error);

Which uses this macro:
https://gitlab.gnome.org/GNOME/glib/-/blob/2.72.1/gobject/
gvaluecollector.h#L213-252

There's no support in it for boolean (1-byte) properties. The problem is that 
f*&*!)ing Glib is written in C and refuses to use bool. They have:

typedef int    gint;
typedef gint   gboolean;

So their boolean is a 4-byte type.

Fixed in https://codereview.qt-project.org/c/qt/qtbase/+/442720

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering





More information about the Interest mailing list