Avoid unloading several libraries in TSan builds
Categories
(Core :: Security: PSM, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: decoder, Assigned: decoder)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
With TSan we cannot unload libsecret once we have loaded it because TSan does not support unloading libraries that are matched from its suppression list. To avoid this problem altogether, let's just not support libsecret for now in TSan builds.
Assignee | ||
Comment 1•4 years ago
|
||
There are a few more places where we load libraries on-demand and the pattern is always quite similar:
- We load the respective library.
- We check by some means, that it provides the necessary features.
- If the required features are not detected, we unload it and return an error (causing the feature to not be supported).
- At destruction time, we unload the library if we kept it around earlier.
I think we can keep the optional features supported by simply avoiding both unloads. If the library was not adequate, we can still keep it around, but return an error nonetheless. At destruction time, we can also just skip the unloading.
I tried this with several libraries now (e.g. libsecret and libcanberra) and no tests fail because of this. Will attach a comprehensive patch in a few that disables all the unloads that caused me trouble either locally or in CI.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Pushed by choller@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/797cd52b8d01 Avoid unloading several libraries in TSan builds. r=froydnj
Comment 4•4 years ago
|
||
bugherder |
Description
•