thread_specific crashes the application when it is in a .so file
Hi, Is there a known issue about boost::thread_specific when a global thread_specific object is in a .so file? The exact same code replacing it with thread_local boost::unique_ptr<Foo> works. By the way is there a macro that determines is thread_local supported from the compiler or not? Thanks, George
Le 02/12/2015 17:10, George Georgiev a écrit :
Hi,
Is there a known issue about boost::thread_specific when a global thread_specific object is in a .so file? Three was a fix for https://svn.boost.org/trac/boost/ticket/3926
Please, could you check with the develop branch?
The exact same code replacing it with thread_local boost::unique_ptr<Foo> works.
By the way is there a macro that determines is thread_local supported from the compiler or not? Not that I'm aware of.
Vicente
On Wed, Dec 2, 2015 at 8:43 AM, Vicente J. Botet Escriba < vicente.botet@wanadoo.fr> wrote:
Le 02/12/2015 17:10, George Georgiev a écrit :
Hi,
Is there a known issue about boost::thread_specific when a global thread_specific object is in a .so file?
Three was a fix for https://svn.boost.org/trac/boost/ticket/3926
Sorry, very tight deadlines. My project environment is very heavy - it is not going to be easy to just drop new version of boost ... and creating test in isolation will take time that I do not have - considering that I have a workaround. The pointed out issue seems different, because in my case there is no unloading of the library, steps are: 1. run the process 2. create a thread 3. load a library - with thread specific ptr 4. access the pointer - crash
Please, could you check with the develop branch?
The exact same code replacing it with thread_local boost::unique_ptr<Foo> works.
By the way is there a macro that determines is thread_local supported from the compiler or not?
Not that I'm aware of.
Vicente
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
On 3/12/2015 06:09, George Georgiev wrote:
On Wed, Dec 2, 2015 at 8:43 AM, Vicente J. Botet Escriba < vicente.botet@wanadoo.fr> wrote:
Le 02/12/2015 17:10, George Georgiev a écrit :
Hi,
Is there a known issue about boost::thread_specific when a global thread_specific object is in a .so file?
Three was a fix for https://svn.boost.org/trac/boost/ticket/3926
Sorry, very tight deadlines. My project environment is very heavy - it is not going to be easy to just drop new version of boost ... and creating test in isolation will take time that I do not have - considering that I have a workaround.
The pointed out issue seems different, because in my case there is no unloading of the library, steps are: 1. run the process 2. create a thread 3. load a library - with thread specific ptr 4. access the pointer - crash
Have you tried loading the library before creating the thread? That's the "normal" load order, and (I'm not familiar with the code but) it's possible that something is dependent on being loaded before threads are created.
participants (3)
-
Gavin Lambert
-
George Georgiev
-
Vicente J. Botet Escriba