[comp.unix.microport] SysV/AT fsck bug

rupley@arizona.edu (John Rupley) (09/11/89)

There has been discussion off and on about a bug in the SysV/AT fsck,
specifically the corruption of fsck's free block bitmap.  Among
other possibilities, a compiler bug has been suggested.

The SysV/AT 2.4 (and 2.3) compiler has a bug that has an effect
consistent with the fsck problem, ie, data is corrupted, obscurely and
unpredictably.  The bug is rare (I found it once in ca 60000 lines of
nethack source).  There appears to be no simple prediction for what
source lines in what code environment will generate buggy assembler.  It
is possible to test for the compiler bug by searching the assembler
source generated by "cc -S" for line pairs matching:

	....,%ds...
	..lds....

Has this bug been looked for in fsck?  If not, would someone be willing to
perform the check?

I don't have access to the uport fsck sources, and I have never bothered
to pick up a disassembler.

For what it may be worth, a script that I used to check a set of source
files is appended.

John Rupley
 uucp: ..{uunet | ucbvax | cmcl2 | hao!ncar!noao}!arizona!rupley!local
 internet: rupley!local@megaron.arizona.edu
 (O) Dept. Biochemistry, Univ. Arizona, Tucson AZ 85721 - (602) 621-3929
--------------------------cut------------------------------------
for i in $*
do
	cc -S -Ml $i 
	sfile=`basename $i .c`.s
	echo "\n$sfile"
	cat $sfile | awk '
		/,%ds:/	{
			next
		}
		/,%ds/	{
			last = $0
			getline
			if ($0 ~ /lds/ && $0 !~ /ds:/) {
				print NR "\t" last
				print "\t" $0
			}
		}'
	rm $sfile
done