Unfortunately I was not able to pinpoint the specific boost library that caused the double free using address sanitizer. As you mentioned the double free occurs during program exit routine and all I see is that some std::string object is being freed.
In this case I do have access to both the main executable and the plugins so I can choose how they are compiled to avoid this error. It would still be good to figure out how I can compile the main executable to be robust to how the shared library plugins are compiled. I will try compiling boost with hidden visibility to see if it resolves this issue. Is this the correct way to achieve that?:
./b2 link=static threading=multi cxxflags='-fPIC -fvisibility=hidden -fvisibility-inlines-hidden' install
You don't want -fPIC in there for a static link do you?
Aren't there some boost libraries that force symbols to have default visibility? If so, setting -fvisibility=hidden won't change that.
Not sure about that - a quick grep suggests that where they do they set visibility to "default" which I think means "same as command line" ? John.