Sunday 15 March 2015

c++ - What g++/ld options make it safe to share STL containers across DSO's on Linux? -


For background, see.

I have a collection of Linux DSOs which are completely under their control. I want to share STL containers among them. I have experienced the mysterious SIGSEGV problems that are related to the ODR violation, which in turn results from non-visible symbols.

It may be that there is only one answer that leaving all code to share a large DSO, or STL containers, however, the purpose of this question is to find an alternative. If the underlying problem is the default visibility rule, then is this an option of the change default visibility rule which will it work? I do not care much about 'throw', just about the container operation. Yes, I know that the containers can throw, but I'm preparing a protected code to avoid it.

My Google-Qualification has returned to me, and in this way I came to know what I think That tells me everything. It will not tell me about STL's powerful internals, but I do not think it is to do.

No comments:

Post a Comment