Re: [Boost-bugs] [Boost C++ Libraries] #12499: Memory allocation fails

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12499: Memory allocation fails
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-10-10 08:02:14


#12499: Memory allocation fails
-------------------------------+-------------------------------------
  Reporter: stephan.menzel@… | Owner: igaztanaga
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: interprocess
   Version: Boost 1.62.0 | Severity: Regression
Resolution: | Keywords: container, interprocess
-------------------------------+-------------------------------------

Comment (by stephan.menzel@…):

 Hello Ion,

 thanks for looking into this. The stacktrace is as follows:

 {{{
> client.exe!__report_gsfailure(unsigned __int64 stack_cookie) Line
 199 C
         client.exe!boost::container::map<unsigned
 __int64,boost::interprocess::offset_ptr<boost::container::basic_string<char,std::char_traits<char>,boost::interprocess::allocator<char,boost::interprocess::segment_manager<char,boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,boost::interprocess::offset_ptr<void,__int64,unsigned
 __int64,0>,0>,boost::interprocess::iset_index> > >,__int64,unsigned
 __int64,0>,std::less<unsigned
 __int64>,boost::interprocess::allocator<std::pair<unsigned __int64 const
 ,boost::interprocess::offset_ptr<boost::container::basic_string<char,std::char_traits<char>,boost::interprocess::allocator<char,boost::interprocess::segment_manager<char,boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,boost::interprocess::offset_ptr<void,__int64,unsigned
 __int64,0>,0>,boost::interprocess::iset_index> > >,__int64,unsigned
 __int64,0>
>,boost::interprocess::segment_manager<char,boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,boost::interprocess::offset_ptr<void,__int64,unsigned
 __int64,0>,0>,boost::interprocess::iset_index>
>,boost::container::tree_opt<0,1> >::operator[](const unsigned __int64 &
 x) Line 542 C++
         client.exe!msgmap_insert(boost::container::map<unsigned
 __int64,boost::interprocess::offset_ptr<boost::container::basic_string<char,std::char_traits<char>,boost::interprocess::allocator<char,boost::interprocess::segment_manager<char,boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,boost::interprocess::offset_ptr<void,__int64,unsigned
 __int64,0>,0>,boost::interprocess::iset_index> > >,__int64,unsigned
 __int64,0>,std::less<unsigned
 __int64>,boost::interprocess::allocator<std::pair<unsigned __int64 const
 ,boost::interprocess::offset_ptr<boost::container::basic_string<char,std::char_traits<char>,boost::interprocess::allocator<char,boost::interprocess::segment_manager<char,boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,boost::interprocess::offset_ptr<void,__int64,unsigned
 __int64,0>,0>,boost::interprocess::iset_index> > >,__int64,unsigned
 __int64,0>
>,boost::interprocess::segment_manager<char,boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family,boost::interprocess::offset_ptr<void,__int64,unsigned
 __int64,0>,0>,boost::interprocess::iset_index>
>,boost::container::tree_opt<0,1> > * n_map,
 boost::shared_ptr<CommandInterface> n_interface, const unsigned __int64
 n_key, const
 std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
 n_value) Line 61 C++
         client.exe!ShmClient::send_command(const
 std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
 n_command) Line 40 C++
         client.exe!main(int argc, char * * argv) Line 11 C++
 }}}

 Looking at the throw location might offer a clue:

 {{{
 #elif defined _M_IX86 || defined _M_X64

     __declspec(noreturn) void __cdecl
 __report_gsfailure(GSFAILURE_PARAMETER)
     {
         if (IsProcessorFeaturePresent(PF_FASTFAIL_AVAILABLE))
         {
             __fastfail(FAST_FAIL_STACK_COOKIE_CHECK_FAILURE);
         }

         volatile UINT_PTR cookie[2];
 }}}

 This leads me to believe it might be a 64/32 bit build mishap along with
 those defines.

 I did notice changes in the way boost builds and strangely it kept saying
 I build for 32 bit. Dependency walker showed a 64 bit lib though and I
 could link.

 I build boost this way:
 {{{
 1) Open Visual Studio Developer shell.
 2) Within, start the vcvars64.bat script to make it work on 64 bit arch.
 3) Create b2.exe by starting bootstrap.bat
 4) Run it using those parameters:
 b2.exe --address-model=64 address-model=64 link=shared,static runtime-
 link=shared threading=multi variant=debug,release stage
 }}}

 I always used to build this way but maybe the changes in the build system
 caused this?

 In any case, I will attach the created solution.

 Thanks,
 Stephan

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12499#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC