|
Boost Users : |
Subject: Re: [Boost-users] [interprocess] managed_shm->find call causes assertion
From: Moritz (mokoman_at_[hidden])
Date: 2010-04-08 13:32:24
Hi again,
the problem seems to be that I work with templates. I wrote a method
that looks like this:
template <typename ObjectType> ObjectType * get_object_pointer() const
{
std::pair<ObjectType*, std::size_t> p = _managed_shm->find<ObjectType>(
ipc::unique_instance );
return p.first;
}
If I remove the template and add a type the assert will not appear.
I am confused ...
Moritz wrote:
>
> Hi,
>
> posted the wrong line number. Should be 107:
>
> inline void interprocess_recursive_mutex::unlock()
> {
> int res = 0;
> res = pthread_mutex_unlock(&m_mut);
> assert(res == 0); // <- HERE!
> }
>
>
> Moritz wrote:
>> Hi,
>>
>> I have a managed_shared_memory segment which contains a
>> unique_instance of an object. When I try to call
>> managed_shm->find<ObjectType>( ipc::unique_instance );
>>
>> I get the following assertion:
>>
>> /usr/include/boost/interprocess/sync/posix/interprocess_recursive_mutex.hpp:110:
>> void boost::interprocess::interprocess_recursive_mutex::unlock():
>> Assertion `res == 0' failed.
>> Aborted
>>
>> This only happens in Release-Mode (with gcc -s -O2). I am not able to
>> build a minimum example but I also can not track the problem. Any
>> suggests?
>>
>> Kind regards
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