id summary reporter owner description type status milestone component version severity resolution keywords cc 9666 managed_shared_memory constructor crash seppleviathan@… Ion Gaztañaga "The following code causes a crash on Visual Studio 2013 when compiling for 64-bit and with optimization. {{{ #include using namespace boost::interprocess; int main() { static const char name[] = ""test_shm""; shared_memory_object::remove(name); managed_shared_memory segment(create_only, name, 65536); return 0; } }}} The reported error is a buffer overrun The crash doesn't happen on 32-bit builds. It also doesn't happen when building without optimization. Finally, it doesn't happen when compiling with /GS- (disable security checks). This is the stack trace: {{{ msvcr120.dll!__crt_debugger_hook(int _Reserved=1) Line 60 C testshm.exe!__raise_securityfailure(_EXCEPTION_POINTERS * ExceptionPointers=0x000000013fa8c170) Line 70 C testshm.exe!__report_gsfailure(unsigned __int64 StackCookie=63963535653567328) Line 241 C testshm.exe!boost::intrusive::rbtree_algorithms,1> >::rebalance_after_insertion(const boost::interprocess::offset_ptr >,__int64,unsigned __int64,0> & header=, boost::interprocess::offset_ptr >,__int64,unsigned __int64,0> p={...}) Line 528 C++ testshm.exe!boost::intrusive::bstree_impl,0>::block_ctrl,boost::intrusive::rbtree_node_traits,1>,0,boost::intrusive::default_tag,3>,void,unsigned __int64,1,4>::insert_equal(boost::interprocess::rbtree_best_fit,0>::block_ctrl & value={...}) Line 861 C++ testshm.exe!boost::interprocess::rbtree_best_fit,0>::priv_add_segment(void * addr=0x0000000050000063, unsigned __int64 segment_size=1374736) Line 426 C++ testshm.exe!boost::interprocess::segment_manager,0>,boost::interprocess::iset_index>::segment_manager,0>,boost::interprocess::iset_index>(unsigned __int64 segment_size=65536) Line 414 C++ testshm.exe!boost::interprocess::ipcdetail::basic_managed_memory_impl,0>,boost::interprocess::iset_index,8>::create_impl(void * addr=0x0000000000000000, unsigned __int64 size=1) Line 176 C++ testshm.exe!boost::interprocess::ipcdetail::managed_open_or_create_impl::priv_open_or_create,0>,boost::interprocess::iset_index,8> > >(boost::interprocess::ipcdetail::create_enum_t type=1068023640, const char * const & id=0x00000000000000c2, unsigned __int64 size=8, boost::interprocess::mode_t mode=read_write, const void * addr=0x0000000000000000, const boost::interprocess::permissions & perm={...}, boost::interprocess::ipcdetail::create_open_func,0>,boost::interprocess::iset_index,8> > construct_func) Line 407 C++ testshm.exe!main() Line 9 C++ testshm.exe!__tmainCRTStartup() Line 626 C kernel32.dll!BaseThreadInitThunk() Unknown ntdll.dll!RtlUserThreadStart() Unknown }}}" Bugs new To Be Determined interprocess Boost 1.55.0 Problem