🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #186

bug with iostream.h?

#186
From: jb145
Date: Thu, 23 Jul 1992 01:14
31 lines
1351 bytes
#I've been having a very frustrating problem with iostream.h in gcc
version 2.0(?).  I am running g++ on a Decstation mips machine.

Is there any known bug in the compiler with respect to buffered input
from the keyboard?  When I comment out the line:

	int from; cin >> from;

then the program runs fine, looping forever without keyboard input.
But when the line is left in, then it works fine for about 100 or 200
inputs cycles until suddenly crashing with a message like:


grow failed because stack limit exceeded, pid 26935, proc play
ts = 0x1c, ds = 0x1d, ss = 0x80
Segmentation fault (core dumped)


I have been chasing this problem for over two weeks and am hoping,
begging that you will have a clue what might be causing it.  By the
way, I've tried lots of hacks such as replacing
		cin >> from;
with
		char str[5]; cin >> str; from = atoi(str);

but the crash remains despite all my efforts.

Thanks very much, whoever you are!!

Justin Boyan
jb145@eng.cam.ac.uk
Technical Details
Message-ID: <9207222314.AA27182@caxton>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!eng.CAm.ac.UK!jb145

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!eng.CAm.ac.UK!jb145
From: jb145@eng.CAm.ac.UK
Subject: bug with iostream.h?
Message-ID: <9207222314.AA27182@caxton>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Thu, 23 Jul 1992 01:14:29 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 32