[comp.sources.bugs] Bug in arc for BSD, squashing?

pinkas@cadev4.intel.com (Israel Pinkas ~) (05/09/88)

I have been trying to bring up the recently posted arc for BSD, with the
patches for PKARC compatible squashing.  (Sorry, I don't have the original
postings, so I can't refer to them.)  I got everything to compile, and I
can extract archives without problems.  However, I run into problems when I
try to Squash a number of files.  Here is a script of what happens:

Script started on Sun May  8 21:11:17 1988
happy:arc> ls -l BugsEtc arc-doc.txt
-rw-r--r--  1 pinkas       3757 May  8 14:26 BugsEtc
-rw-r--r--  1 pinkas      56989 May  8 14:26 arc-doc.txt
happy:arc> arc aq t arc-doc.txt
Creating new archive: t.arc
Adding file:   arc-doc.txt    analyzing, squashing, done.
happy:arc> arc aq t2 BugsEtc arc-doc.txt
Creating new archive: t2.arc
Adding file:   BugsEtc        analyzing, squashing, done.
Adding file:   arc-doc.txt    analyzing, ^C
happy:arc> exit
happy:arc> 
script done on Sun May  8 21:15:45 1988

I aborted the second run of arc after a few minutes.  The first one took
only a few seconds.  Running dbx, I find that the code is looping in
squash.c, lines 333-342:

probe:
    if((i -= disp) < 0)
         i += HSIZE;

    if(htab[i] == fcode)
    {    ent = codetab[i];
         return;
    }
    if(htab[i] > 0)
         goto probe;

It turns out that htab[i] is never zero.  This occurs when I am 33078 bytes
into the file (as reported by stdlen).

Does anybody understand this code enough to tell me why this is happening?
Or better, has anybody else run across it and fixed it?

This occurs both on a Sun 386i (RoadRunner) running SunOS, and Vaxen
running Ultrix 2.0 and 2.2 Beta.

-Israel
--------------------------------------
Disclaimer: The above are my personal opinions, and in no way represent
the opinions of Intel Corporation.  In no way should the above be taken
to be a statement of Intel.

UUCP:	{amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!cadev4!pinkas
ARPA:	pinkas%cadev4.intel.com@relay.cs.net
CSNET:	pinkas%cadev4.intel.com