Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 6108 - error in strstream library
Summary: error in strstream library
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 6.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-10-19 23:53 UTC by vonmatt
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-10-20 02:50:40 UTC


Attachments (Terms of Use)

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@ise.com

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++.


Note You need to log in before you can comment on or make changes to this bug.