Mir

Comment 15 for bug 1358191

Revision history for this message
Alexandros Frantzis (afrantzis) wrote : Re: [regression] Clients are crashing (SIGSEGV) on mir_connect()

The core issue seems to be that in this scenario the platform shared library is unloaded before the configuration object is being destroyed. The configuration object is holding a weak pointer to a shared pointer object (shared_ptr for the client platform factory) that was instantiated inside the platform library, and when the library is unloaded, type information and vtable for that shared pointer type vanishes too. When we try to destroy the weak_ptr we end up accessing memory that is invalid.

I have proposed an MP that spikes a fix for this: https://code.launchpad.net/~afrantzis/mir/fix-1358191-connect-segv-spike/+merge/232108 by keeping the library loaded for as long as needed.