Skip to content
  • Michal Privoznik's avatar
    meson: Bump glib version to 2.58.0 · 9c1cfc33
    Michal Privoznik authored
    
    
    Now that we don't have any distro stuck with glib-2.56.0, we can
    bump the glib version. In fact, this is needed, because of
    g_clear_pointer. Since v7.4.0-rc1~301 we declare at compile time
    what version of glib APIs we want to use (by setting
    GLIB_VERSION_MIN_REQUIRED = GLIB_VERSION_MAX_ALLOWED = 2.56.0),
    regardless of actual glib version in the host.
    
    And since we currently require glib-2.56.0 and force glib to use
    APIs of that version, some newer bits are slipping from us. For
    instance: regular function version of g_clear_pointer() is used
    instead of a fancy macro. So what? Well, g_clear_pointer()
    function typecasts passed free function to void (*)(void *) and
    then calls it. Well, this triggers UBSAN, understandably. But
    with glib-2.58.0 the g_clear_pointer() becomes a macro which
    calls the free function directly, with no typecasting and thus no
    undefined behavior.
    
    Signed-off-by: default avatarMichal Privoznik <mprivozn@redhat.com>
    Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.c...>
    9c1cfc33