This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/6795: stringbuf failure
- From: ssomers at opnet dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: Fri, 24 May 2002 12:05:55 +0200
- Subject: c++/6795: stringbuf failure
>Number: 6795
>Category: c++
>Synopsis: stringbuf failure
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Fri May 24 03:16:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Stein Somers
>Release: 3.1
>Organization:
OPNET Technologies
>Environment:
System: SunOS zweistein 5.6 Generic_105181-20 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4
host: sparc-sun-solaris2.6
build: sparc-sun-solaris2.6
target: sparc-sun-solaris2.6
configured with: ../gcc-3.1/configure --prefix=/opt/gcc-3.1
>Description:
istringstream doesn't seem to work here since upgrading from 3.0.4.
I didn't run the test suite (very tight on disk space).
SEGV during operator >>, after first underflow() in buffer
>How-To-Repeat:
#include <sstream>
int main (int argc, char** argv)
{
std::string mytext = "hello \nworld";
std::istringstream i(mytext);
// alternative: std::stringbuf buf(mytext, std::ios_base::in);
// alternative: std::istream i(&buf);
std::string word;
i >> word;
return word == "hello";
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: