Mir does not care what the client-platform file names are. It loads and searches them all, including your mesa.so.2
While the Mir code internally correctly uses dlvsym to restrict the symbol versions it's willing to use, the Mesa code does not check the symbol versions:
Mesa will find the first one in your address space. And that may well be mesa.so.2 it finds before mesa.so.3.
So we either need to:
* avoid loading old modules according to file name, or
* enhance egl-platform-mir.patch to to use dlvsym instead of dlsym, or
* aggressively unload modules, ensuring they are not present in memory except while they're being probed.
I suspect the third option is best. I noticed a problem like that the other day anyway -- client processes seem to have all client modules loaded. We're leaking them I think.
Oooh, I see the problem:
Mir does not care what the client-platform file names are. It loads and searches them all, including your mesa.so.2
While the Mir code internally correctly uses dlvsym to restrict the symbol versions it's willing to use, the Mesa code does not check the symbol versions:
+#ifdef HAVE_MIR_PLATFORM is_valid( EGLNativeDispla yType nativeDisplay) isplayIsValidFu nc)(MirMesaEGLN ativeDisplay* ); playIsValidFunc general_check; playIsValidFunc client_check; playIsValidFunc server_check; splayIsValidFun c) dlsym(lib, "mir_egl_ mesa_display_ is_valid" ); splayIsValidFun c) dlsym(lib, "mir_client_ mesa_egl_ native_ display_ is_valid" ); splayIsValidFun c) dlsym(lib, "mir_server_ mesa_egl_ native_ display_ is_valid" );
+static EGLBoolean
+_mir_display_
+{
+ typedef int (*MirEGLNativeD
+
+ void *lib;
+ MirEGLNativeDis
+ MirEGLNativeDis
+ MirEGLNativeDis
+ EGLBoolean is_valid = EGL_FALSE;
+
+ lib = dlopen(NULL, RTLD_LAZY);
+ if (lib == NULL)
+ return EGL_FALSE;
+
+ general_check = (MirEGLNativeDi
+ client_check = (MirEGLNativeDi
+ server_check = (MirEGLNativeDi
+
Mesa will find the first one in your address space. And that may well be mesa.so.2 it finds before mesa.so.3.
So we either need to: mir.patch to to use dlvsym instead of dlsym, or
* avoid loading old modules according to file name, or
* enhance egl-platform-
* aggressively unload modules, ensuring they are not present in memory except while they're being probed.
I suspect the third option is best. I noticed a problem like that the other day anyway -- client processes seem to have all client modules loaded. We're leaking them I think.