[Bug libstdc++/40779] New: basic_string::_M_disjunct corner case

jkt at mailsnare dot net gcc-bugzilla@gcc.gnu.org
Thu Jul 16 21:22:00 GMT 2009

i found a corner case, definitely odd but legal, in basic_string::_M_disjunct. 
consider the following:

string s1("abcd");
string s2(s1); // make it shared
s1.append(s.data() - 1, 5);

_M_disjunct should return true but, because it does not check the length,

i created a patch for this but see no where to attach it.

           Summary: basic_string::_M_disjunct corner case
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jkt at mailsnare dot net
  GCC host triplet: x86_64-suse-linux


More information about the Gcc-bugs mailing list