Mir

libmirclient cannot be reloaded through dlopen

Bug #1670844 reported by Brandon Schaefer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
In Progress
High
Brandon Schaefer
0.26
Triaged
High
Brandon Schaefer
mir (Ubuntu)
Triaged
High
Brandon Schaefer

Bug Description

Code example:
http://paste.ubuntu.com/24133139/

Fails on the 2nd load due to an issue of libprotobuf-lite not being unloaded. Meaning the static variables aren't being re-inited. Protobuf uses a static variable for an empty string optimization which ends up becoming a dangling pointer:

back trace:
http://paste.ubuntu.com/24133152/

valgrind:
http://paste.ubuntu.com/24133156/

The workaround/fix that we saw was to re-set that static variable which will let the empty string be init'd correctly.

Related branches

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

This is mainly an issue with dynamic loading in SDL2 which ends up re-loading libmirclient twice.

Changed in mir:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Brandon Schaefer (brandontschaefer)
milestone: none → 1.0.0
milestone: 1.0.0 → 0.26.2
Changed in mir (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Brandon Schaefer (brandontschaefer)
summary: - Mirclient cannot be reloaded through dlopen
+ libmirclient cannot be reloaded through dlopen
Changed in mir:
milestone: 0.26.2 → 1.0.0
Changed in mir (Ubuntu):
status: In Progress → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

We've been creating multiple bug reports for single bugs too often recently. Let's get it down to one each...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.