Ticket #3951 (closed Bugs: fixed)
assertion failed calling find<> in managed_shared_memory (might be a bug in g++)
|Reported by:||Xavi Gratal <gratal@…>||Owned by:||igaztanaga|
I am getting the following assertion failed
/usr/local/include/boost/interprocess/sync/posix/interprocess_recursive_mutex.hpp:107: void boost::interprocess::interprocess_recursive_mutex::unlock(): Assertion `res == 0' failed.
when compiling the extremely simple attached program in GCC 4.4.3 with optimization on (-O2 or -O3)
it doesn't happen with -O0 or -O1, or if I use -fno-strict-aliasing on top of -O2.
I have also got this assertion failed error with GCC 4.4.1, but I wasn't able to isolate it into a simple program.
The bug depends a lot on the GCC version and the optimization options, so I guess it is a bug in the compiler, but it affects the usability of boost, so I think it is worth reporting it here