🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1664

2 libg++-1.32.0 bug fixes

#1664
From: Doug Lea
Date: Fri, 27 Jan 1989 11:33
51 lines
1911 bytes
Here is a fix to the failure of AVLs to check for null trees when
attempting to delete items. This problem caused core dumps in
test19 on some machines (but not on my vax, which loves to
dereference null pointers!) Sorry.

R>cd libg++/g++-include
R>diff -rc2N AVLSet.ccP~ AVLSet.ccP
*** AVLSet.ccP~	Wed Jan  4 15:35:01 1989
--- AVLSet.ccP	Wed Jan 18 06:07:33 1989
***************
*** 550,553 ****
--- 550,554 ----
  void <T>AVLSet::del(<T&> item)
  {
+   if (root == 0) return;
    _need_rebalancing = 0;
    _already_found = 0;
R>diff -rc2N AVLMap.ccP~ AVLMap.ccP
*** AVLMap.ccP~	Wed Jan  4 15:35:01 1989
--- AVLMap.ccP	Wed Jan 18 06:07:26 1989
***************
*** 550,553 ****
--- 550,554 ----
  void <T><C>AVLMap::del(<T&> item)
  {
+   if (root == 0) return;
    _need_rebalancing = 0;
    _already_found = 0;

Also, while I'm at it, the following change to the top-level
libg++ Makefile seems to make some machines happier.

R>cd ~/libg++
R>diff -rc2N Makefile~ Makefile
*** Makefile~	Tue Jan 10 14:01:30 1989
--- Makefile	Fri Jan 27 06:19:42 1989
***************
*** 56,60 ****
  	cp g++-include/* $(IDIR)
  	install -c -m 755 genclass $(BINDIR)
! 	install -c src/libg++.a $(LIBDIR)
  	ranlib $(LIBDIR)/libg++.a
  
--- 56,60 ----
  	cp g++-include/* $(IDIR)
  	install -c -m 755 genclass $(BINDIR)
! 	(cd src; install -c libg++.a $(LIBDIR))
  	ranlib $(LIBDIR)/libg++.a
  
-Doug
Technical Details
Message-ID: <8901271133.AA05775@rocky>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bbn!mailrus!tut.cis.ohio-state.edu!ROCKY.OSWEGO.EDU!dl
References: <8901270320.AA10069@wiener.usc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bbn!mailrus!tut.cis.ohio-state.edu!ROCKY.OSWEGO.EDU!dl
From: dl@ROCKY.OSWEGO.EDU (Doug Lea)
Newsgroups: gnu.g++.bug
Subject: 2 libg++-1.32.0 bug fixes
Message-ID: <8901271133.AA05775@rocky>
Date: 27 Jan 89 11:33:53 GMT
References: <8901270320.AA10069@wiener.usc.edu>
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: dl%rocky.oswego.edu@nisc.nyser.net
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 51