[boost::interprocess] assertion failure while buding with -O3
Hello,
I am getting assertion failure in boost inter process library (trying to connect client/server via shared memory).
This is happening especially while building an optimized version (-O3). When I build my applications in debug version I do not get this failure.
Please let me know if anyone come across this type of issue earlier. I have included stack trace below, also let me know if any more information required.
I am using boost version 1_40.
#0 0x00007ffff70d1a75 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff70d55c0 in *__GI_abort () at abort.c:92
#2 0x00007ffff70ca941 in *__GI___assert_fail (assertion=0x4888a3 "res == 0", file=<value optimized out>, line=107, function=0x48af60 "void boost::interprocess::interprocess_recursive_mutex::unlock()")
at assert.c:81
#3 0x000000000045da9a in void* boost::interprocess::segment_manager
On Wed, 22 Aug 2012 21:04:40 +0200, Priyank Patel
Hello,
I am getting assertion failure in boost inter process library (trying to connect client/server via shared memory). This is happening especially while building an optimized version (-O3). When I build my applications in debug version I do not get this failure.
Hi, You may try to use valgrind to find possible causes for spurious errors. Use it with debug version of your executable, iron out all found errors, and most of the time the spurious error seen previously with optimized version will go away. -- Slava
Thanks. I will try that out but if I use "-fno-strict-aliasing" flag with -O3 option, application works fine.
Priyank
-----Original Message-----
From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Viatcheslav.Sysoltsev@h-d-gmbh.de
Sent: Thursday, August 23, 2012 2:01 AM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] [boost::interprocess] assertion failure while buding with -O3
On Wed, 22 Aug 2012 21:04:40 +0200, Priyank Patel
Hello,
I am getting assertion failure in boost inter process library (trying to connect client/server via shared memory). This is happening especially while building an optimized version (-O3). When I build my applications in debug version I do not get this failure.
Hi, You may try to use valgrind to find possible causes for spurious errors. Use it with debug version of your executable, iron out all found errors, and most of the time the spurious error seen previously with optimized version will go away. -- Slava _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Priyank Patel
-
Viatcheslav.Sysoltsev@h-d-gmbh.de