Mir

Comment 15 for bug 1526658

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: mir may use incompatible client platform to validate server display

Bad news: This bug may be unfixable for systems with mesa.so.2 (Mir 0.14) and earlier packages.

Because they all contain this leak:
extern "C" int __attribute__((constructor))
ensure_loaded_with_rtld_global_mesa_client()
{
    Dl_info info;

    // Cast dladdr itself to work around g++-4.8 warnings (LP: #1366134)
    typedef int (safe_dladdr_t)(int(*func)(), Dl_info *info);
    safe_dladdr_t *safe_dladdr = (safe_dladdr_t*)&dladdr;
    safe_dladdr(&ensure_loaded_with_rtld_global_mesa_client, &info);
    dlopen(info.dli_fname, RTLD_NOW | RTLD_NOLOAD | RTLD_GLOBAL);
    return 0;
}

which means the very act of dlopening mesa.so.2 to probe it means it is forever leaked and stays resident (missing dlclose). I've fixed that leak in:
   https://code.launchpad.net/~vanvugt/mir/fix-1527449/+merge/281969
but we would need:
  * the same fix in all prior Mir releases retrospectively; or
  * Mir to never even try to dlopen *.so.2 ; or
  * Users to use the workaround of simply removing all old mir-client-platform-mesa* packages from their systems.