Bug 6108

Summary: error in strstream library
Product: [Retired] Red Hat Linux Reporter: vonmatt
Component: gccAssignee: David Lawrence <dkl>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: vonmatt
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-10-20 02:50:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description vonmatt 1999-10-19 23:53:04 UTC
The following program leads to a segmentation fault in
RedHat 6.0.  This used to work in release 5.2.

#include <iostream.h>
#include <strstream.h>
#include <stdio.h>

const char* input =
  "1: The quick brown foxes jumped over the lazy dog.\n"
  "2: The quick brown foxes jumped over the lazy dog.\n"
  "3: The quick brown foxes jumped over the lazy dog.\n"
  "4: The quick brown foxes jumped over the lazy dog.\n"
  "5: The quick brown foxes jumped over the lazy dog.\n"
  "6: The quick brown foxes jumped over the lazy dog.\n"
  "7: The quick brown foxes jumped over the lazy dog.\n"
  "8: The quick brown foxes jumped over the lazy dog.\n";

int main ()

{ istrstream istr (input);
  int c;
  while ((c = istr.get ()) != EOF) {
    cout << (char) c;
  }
  return 0;
}


Urs von Matt
Ise Inc.
vonmatt

Comment 1 Bill Nottingham 1999-10-20 02:50:59 UTC
Works fine for me in both 6.0 and 6.1. Make sure you aren't trying to link against
an incompatible libg++.