libmirclient cannot be reloaded through dlopen
Bug #1670844 reported by
Brandon Schaefer
This bug report is a duplicate of:
Bug #1667352: SDL apps either "Failed to connect to the mir server: ..." or segfault in protobuf via mir_connect_sync.
Edit
Remove
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://
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://
valgrind:
http://
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
lp:~brandontschaefer/mir/mirclient-reload
- Daniel van Vugt: Approve
- Mir CI Bot: Needs Fixing (continuous-integration)
- Kevin DuBois (community): Approve
-
Diff: 17 lines (+3/-0)1 file modifiedsrc/protobuf/google_protobuf_guard.cpp (+3/-0)
Changed in mir: | |
milestone: | 0.26.2 → 1.0.0 |
Changed in mir (Ubuntu): | |
status: | In Progress → Triaged |
To post a comment you must log in.
This is mainly an issue with dynamic loading in SDL2 which ends up re-loading libmirclient twice.