This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/16612] New: empty basic_strings can't live in shared memory
- From: "steve dot horn at gs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jul 2004 03:37:48 -0000
- Subject: [Bug libstdc++/16612] New: empty basic_strings can't live in shared memory
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
It appears that a basic_string created with a default constructor can't live in
shared memory because basic_string uses a static variable to hold a single empty
string (stored in _S_empty_rep_storage)
The memory associated with the empty string representation is local to the
process that created the string. Therefore one process can not access empty
strings created by a different process.
I would guess that basic_string should use it's allocator to acquire the memory
for the empty string representation.
--
Summary: empty basic_strings can't live in shared memory
Product: gcc
Version: 3.2.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: steve dot horn at gs dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16612