[Boost-bugs] [Boost C++ Libraries] #5593: boost::interprocess::basic_string::c_str() result not null-terminated when used with shared memory allocator

Subject: [Boost-bugs] [Boost C++ Libraries] #5593: boost::interprocess::basic_string::c_str() result not null-terminated when used with shared memory allocator
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-06-04 21:12:54


#5593: boost::interprocess::basic_string::c_str() result not null-terminated when
used with shared memory allocator
-------------------------------------------------+--------------------------
 Reporter: Anil Gangolli <anil@…> | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
  Version: Boost 1.46.1 | Severity: Problem
 Keywords: |
-------------------------------------------------+--------------------------
 I'm seeing this issue using boost::interprocess:basic_string (aliases
 boost::container::string) allocated using boost::interprocess::allocator
 based on a boost::interprocess::managed_map_file::segment_manager.

 The c_str() function is not returning a null-terminated string in general.
 This problem does not seem to occur using boost::container::string (using
 the standard allocator).

 The attached test program illustrates the problem. I compiled the test
 under gcc 4.5 using flags -DBOOST_DATE_TIME_NO_LIB

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5593>
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:06 UTC