This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/16612] New: empty basic_strings can't live in shared memory


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]