🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.lib.bug
Article #1

libg++-2.2 - bug in filebuf.C

#1
From: Martin Junius
Date: Tue, 27 Oct 1992 11:36
32 lines
1386 bytes
Hi!

libg++-2.2 as of prep.ai.mit.edu:

There seems to be a bug in the underflow()/overflow() handling in 
filebuf's. When both reading and writing the buffer pointers get 
messed up. The problem is that _S_CURRENTLY_PUTTING isn't cleared 
when starting a new read operation.

I added the following patch to iostream/filebuf.C to solve this 
problem:

*** filebuf.C-ORIG	Tue Oct 27 12:18:56 1992
--- filebuf.C	Tue Oct 27 12:19:47 1992
***************
*** 267,272 ****
--- 267,274 ----
  	if (do_flush()) return EOF;
  #endif
  
+     switch_to_get_mode();
+ 
      _G_ssize_t count = sys_read(base(), ebuf() - base());
      if (count <= 0) {
  	if (count == 0)

Martin
-- 
 _____ _____
|     |___  |   Martin Junius           FIDO:      2:242/6.1
| | | |   | |   Communication Networks  Internet:  mj@dfv.rwth-aachen.de
|_|_|_|@work|   Aachen U of Technology  Phone:     ++49-241-8790220 (voice)
Technical Details
Message-ID: <9210271136.AA02460@orc.dfv.rwth-aachen.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!orc.dfv.rwth-aachen.de!mj

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.lib.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!orc.dfv.rwth-aachen.de!mj
From: mj@orc.dfv.rwth-aachen.de (Martin Junius)
Subject: libg++-2.2 - bug in filebuf.C
Message-ID: <9210271136.AA02460@orc.dfv.rwth-aachen.de>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 27 Oct 1992 11:36:37 GMT
Approved: bug-lib-g++@prep.ai.mit.edu
Lines: 33