Subject: Re: [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: 2012-09-12 22:50:51
#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: closed
Milestone: To Be Determined | Component: interprocess
Version: Boost 1.46.1 | Severity: Problem
Resolution: invalid | Keywords:
--------------------------------------------------+-------------------------
Comment (by dominik.ernst@â¦):
I just found this Bug-report, when I searched for information about
strange behaviour.
Following Code
{{{
cout << model.c_str() << " ";
cout << model << std::endl;
}}}
results in
BS-2020SjB�GmA BS-2020S
(the original string is BS-2020S, model is a basic_string)
which looks like a missing null-termination.
Linux Mint 13, gcc 4.6, boost 1.47
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5593#comment:5> 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:10 UTC