[pool] singleton_pool crash in multithreaded mode

Hi,
I have a strange bug here. I am using singleton_pool and it crashes at
a call to singleton_pool::ordered_malloc in multithreaded mode. The
funny thing is I am locking a mutex before the call and it still
crashes. The test file can be found here:
https://svn.boost.org/svn/boost/sandbox/block_ptr/libs/smart_ptr/example/thr...
And the calls to the pool (allocate & deallocate) a made from class
"pool" of the following file:
https://svn.boost.org/svn/boost/sandbox/block_ptr/boost/detail/block_base.hp...
The backtrace I get is:
#0 0x0000000000407842 in boost::simple_segregated_storage<unsigned
long>::try_malloc_n (start=@0x42e7ddc0, n=10, partition_size=8)
at
/home/vnmr1/phil/boost_1_46_1/boost/pool/simple_segregated_storage.hpp:236
#1 0x00000000004078f7 in boost::simple_segregated_storage<unsigned
long>::malloc_n (this=0x614d88, n=11, partition_size=8)
at
/home/vnmr1/phil/boost_1_46_1/boost/pool/simple_segregated_storage.hpp:260
#2 0x000000000040c2ab in
boost::poolboost::default_user_allocator_new_delete::ordered_malloc
(this=0x614d88, n=88)
at /home/vnmr1/phil/boost_1_46_1/boost/pool/pool.hpp:527
#3 0x000000000040c9b8 in boost::singleton_pool
Anybody has any idea? Thanks, -Phil
participants (1)
-
Phil Bouchard