[poppler] Bad interaction between libgs, lcms2 and poppler
Albert Astals Cid
aacid at kde.org
Mon Jan 13 13:07:07 PST 2014
Hi, I am writing this because I just discovered a bad interaction between
libgs, lcms2 and poppler.
Let me describe the situation first:
* User is using Okular[1] to view documents
* User opens a PS file. Okular loads a plugin that uses libgs to open the
file
* libgs calls cmsPluginTHR to set its own memory handler
* User closes PS file. Okular unloads the plugin that uses libgs
* User opens a PDF file. Okular loads a plugin that uses poppler to open the
file
* poppler uses lcms calls and since cmsPluginTHR was set by libgs but never
reset when the libgs plugin was destroyed, lcms crashes
The only solution I can think of from my side is never unloading the plugin
that uses libgs, but I'd like not to get there.
I looked at lcms code and doesn't seem to be a way for libgs to unload it's
plugin (there seems to be a unloadAll, but that would not be a good idea
either).
Do you think it makes sense for lcms to provide such a functionality?
Or anyone has a better idea?
Cheers,
Albert
[1] http://okular.kde.org/
More information about the poppler
mailing list