Boost logo

Boost Users :

Subject: Re: [Boost-users] 1.36 Threads/ASIO causing SEGV when cleaning up thread specific storage
From: spiderlama (spiderlama_at_[hidden])
Date: 2008-09-17 05:10:52


Anthony Williams-4 wrote:
>
> spiderlama <spiderlama_at_[hidden]> writes:
>
>> I am trying to run my unit previous unit tests with the new 1.36 release,
>> but
>> SEGV is being thrown upon exit. No faults are thrown using 1.34.1, and no
>> code is changed between versions. But for some reason, it keeps throwing!
>>
>> The TSS callback functions are empty as below, as no TSS variables own
>> their
>> data.
>
> For an access violation with that callstack, the heap must be corrupt
> (the error is happening when a shared_ptr destroys the count
> object). Without the code I cannot help further.
>
> Anthony
> --
> Anthony Williams | Just Software Solutions Ltd
> Custom Software Development | http://www.justsoftwaresolutions.co.uk
> Registered in England, Company Number 5478976.
> Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>

Here's some code that breaks:

 boost::thread_specific_ptr<int> tss;
 tss.reset(new int(10));

It seems that the shared_ptr (inside thread_specific_ptr) uses an internal
memory manager for the reference counter which has already been destructed
so when the shared_ptr tries to delete this memory it goes boom!

-- 
View this message in context: http://www.nabble.com/1.36-Threads-ASIO-causing-SEGV-when-cleaning-up-thread-specific-storage-tp19428245p19527778.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net