🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.4bsd
Article #2

Re: bsd db deletion problem

#2
From: Steve Romig
Date: Sat, 01 Aug 1992 07:16
24 lines
1866 bytes
I ran into that bug a few weeks ago and reported it to Margo Seltzer
(one of the authors of db).  She fixed it a slightly different way
than I had.  I imagine that they'll make it available on
okeefe.berkeley.edu as they had the previous version.  I looked at the
copy on okeefe as of today, and its an older copy that still has the
bug.

The bug that I ran into is basically this: if you delete the last
entry on an overflow page, and then traverse the database with
hash_seq, hash_seq runs into problems cause it doesn't notice that
there are no entries on that page now and returns a bogus pointer
to part of an old key.  The fix was to check for this and loop around
till we hit a page with something on it.  Or something like that.  I'd
rather not post my diffs, since I used a goto and its different than
what the "real code" looks like now.  I'll ask Margo to update the
stuff on okeefe.

BTW, you really want to pick up the latest stuff from okeefe, there
are a few other bugs that've been fixed in the last few months.  The
symptoms are that sometimes entries lose their values.  I've been
testing the hash portion of the db library and haven't run into any
problems after having fixed the hash_seq bug and the others.

--- Steve
Technical Details
Message-ID: <ROMIG.92Aug1021641@hadrosaur.cis.ohio-state.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!hadrosaur.cis.ohio-state.edu!romig
References: <1992Jul27.194056.26921@bnr.ca> <1992Jul30.144545.15534@alias.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.bugs.4bsd
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!hadrosaur.cis.ohio-state.edu!romig
From: romig@hadrosaur.cis.ohio-state.edu (Steve Romig)
Subject: Re: bsd db deletion problem
In-Reply-To: mark@alias.com's message of Thu, 30 Jul 1992 14: 45:45 GMT
Message-ID: <ROMIG.92Aug1021641@hadrosaur.cis.ohio-state.edu>
Originator: romig@hadrosaur.cis.ohio-state.edu
Sender: news@cis.ohio-state.edu (NETnews        )
Organization: Ohio State Computer Science
References: <1992Jul27.194056.26921@bnr.ca> <1992Jul30.144545.15534@alias.com>
Date: Sat, 1 Aug 1992 07:16:41 GMT
Lines: 24