help with fixing a shell bug? (whimper)

Chuq Von Rospach chuqui at nsc.UUCP
Mon Apr 23 13:17:50 AEST 1984


I am having a h*ll of a time tracking down a problem in /bin/sh. It seems
to be endemic with 4BSD, and incorporating the appropriate changes from 
SYS V.2 don't help it either. On some occasions the shell goes into a hard
loop in the allocation routines (blok.c, routine alloc()) on a line which
says 'WHILE !busy(q = p->word) DO p->word = q->word OD'. (Yes, that is C
code, folks... well, kinda...). The allocation routines seem to assume that
sbrk return values aligned on word (possible double word) boundries, and
use the lowest bit of the address to signify whether or not the block of
memory contains anything of use. Evidently in certain circumstances it gets
confused and loops through the list forever.

Has anyone else ever seen and/or fixed this bug before? This has been
popping up on our Genix system (on the 16032 chip), and I don't know
whether or not Vaxen or PDP's are prone. Suggestions/help? 

chuq
-- 
>From under the bar at Callahan's:		Chuq Von Rospach
{amd70,fortune,hplabs,menlo70}!nsc!chuqui	(408) 733-2600 x242

Never give your heart to a stranger, unless you are sure that you are dead.



More information about the Net.bugs mailing list