[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#137017: libstdc++3-dev: Included code for rope segment faults. Runs OK in v2.10



Package: libstdc++3-dev
Version: 1:3.0.4-1
Severity: important

The following code will segment fault with the installed libstdc++ and
g++-3.0.   It runs correctly on the 2.9x compiler with the v2.10 of
libstdc++.  Note that the substr line, a replacement for erase, also
fails with the 3.0 compiler.  


/* buffertest.cc

*/

using namespace std;

#include <stdio.h>
#include <unistd.h>
#include <ext/rope>

int main (int, char**)
{
  rope<char> r;
  char sz[] = 
    "Now is the time for all good men to come to the aid of their party.\n"
    "Now is the time for all good men to come to the aid of their party.\n"
    "Now is the time for all good men to come to the aid of their party.\n"
    "Now is the time for all good men to come to the aid of their party.\n";
  
  r.append (sz, strlen (sz));
  while (r.size ()) {
    printf ("%d\n", r.size ());
    r.erase (0,50);
    //    r = r.substr (50, r.size () - 50);
  }
  exit (0);
}



-- System Information
Debian Release: testing/unstable
Kernel Version: Linux florence 2.4.17 #2 SMP Sun Jan 6 11:01:58 PST 2002 i686 unknown

Versions of the packages libstdc++3-dev depends on:
ii  g++-3.0        3.0.4-1        The GNU C++ compiler.
ii  gcc-3.0-base   3.0.4-1        The GNU Compiler Collection (base package).
ii  libc6-dev      2.2.4-7        GNU C Library: Development Libraries and Hea
ii  libstdc++3     3.0.4-1        The GNU stdc++ library version 3



Reply to: