[comp.sys.m6809] Another OS9 C bug

knudsen@ihwpt.ATT.COM (mike knudsen) (08/25/87)

I don't recall whether this one has been posted before,
but last nite I got bit by a bad bug in the C compiler,
specifically in the assembler c.asm.
	Someone who worked on it saved a few bytes by not
checking for EOF on every read from the source file
(usually file.o if from c).
Consequently, if file.o is truncated (due to disk filling up
or a random glitch in the C pipeline), c.asm will just hang.
Worse yet, you can't KILL it, because OS9 will not let a process
die if it has an I/O wait pending.  So you lose the window it
was running in (I guess you can de-iniz it and start another
shell on it, maybe) and your screen keeps on sparkling from this
un-killable process running in the background.

	Given that c.asm is really RMA (relocatable macro assembler)
that is sometimes used directly by humans writing in assembler,
and humans may forget the END statement or whatever,
this is a pretty serious oversight.
	So is OS9's lack of a KILL -9 or whatever that will
kill a process, PERIOD, no and/if/buts.

Fortunately I don't expect this to happen too often.

PS:  The problem may have been more serious and subtle.
While the rogue process was running, I tried copying
a file, and that window hung up too. There was plenty of
disk space left.  Time for a reboot.  Guess this is the
price you pay for having your OS in RAM instead of good old
reliable ROM.  Seriously, that must be why Coco-3s crash more often
than 1s or 2s while running plain old BASIC.
-- 
Mike J Knudsen    ...ihnp4!ihwpt!knudsen  Bell Labs(AT&T)
    Delphi: RAGTIMER    CIS: <memory failure, too many digits>
		"Just say NO to MS-DOS!"