Article View: news.software.readers
Article #6976tass 3.2 patch - hash table fix
From: Jeff Bauer
Date: Thu, 16 Dec 1993 17:25
Date: Thu, 16 Dec 1993 17:25
23 lines
1584 bytes
1584 bytes
We enjoy the look & feel of tass 3.2 enough to where an annoying problem finally had to be fixed. It would core dump now & then on a certain combination of header strings that generated negative indices via the hash function in hashstr.c. Rather than figure out a better function, I just put in a quick sign flip that prevents the crashes. Here it is. Anybody know if there's a newer version of tass anywhere (please email responses) ? *** hashstr.c.ORIG Thu Dec 16 11:57:39 1993 --- hashstr.c Thu Dec 16 11:55:49 1993 *************** *** 51,56 **** --- 51,57 ---- while (*t) h = ((h << 1) ^ *t++) % TABLE_SIZE; /* h = (h * 128 + *t++) % TABLE_SIZE; */ + if (h < 0L) h = -h; } p = table[h]; -- Jeff Bauer jtbauer@acns.fsu.edu FSU Academic Computing & Network Services (904) 644-2591 x. 131
Technical Details
Message-ID:
<2eq5mr$95p@mailer.fsu.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!newsserver.jvnc.net!yale.edu!spool.mu.edu!agate!usenet.ins.cwru.edu!ukma!eng.ufl.edu!usenet.ufl.edu!mailer.acns.fsu.edu!loligo.cc.fsu.edu!bauerShow Full Headers
Complete Article Headers
Message-ID: <2eq5mr$95p@mailer.fsu.edu> Subject: tass 3.2 patch - hash table fix Date: Thu, 16 Dec 1993 17:25:47 +0000 From: bauer@loligo.cc.fsu.edu (Jeff Bauer) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!newsserver.jvnc.net!yale.edu!spool.mu.edu!agate!usenet.ins.cwru.edu!ukma!eng.ufl.edu!usenet.ufl.edu!mailer.acns.fsu.edu!loligo.cc.fsu.edu!bauer Newsgroups: news.software.readers Organization: Florida State University Academic Computing & Network Services Lines: 23 Distribution: world NNTP-Posting-Host: loligo.cc.fsu.edu