[comp.sys.atari.st.tech] Re Three bombs and Sozobon using Gemini

lrh@ukc.ac.uk (Luke) (11/02/90)

I also found a bug in Dlibs1.2 in the initargs.c moudule.

It attempts to get the pointer to the parents basepage from the basepage, it 
then trys copy the environment from the parent if this is zero then it bombs
as it is trying to copy memory location zero and to do this you need to be in 
supervisor mode. The fix is simply to add a line into initargs to check if the
pointer is zero and do nothing if it is zero.

The reason that gemini bombs is because it passes zero for the pointer, I found
that the debugger i use does this, and it caused programs compiled with sozobon
to bomb.


A bug in hcc is after a function call has been made the stack is then tidied up

however this is the code it generates.

	move.l	#10,-(sp)
	jsr	_function
	add.w	#4,sp

the 		add.w	#4,sp
should be 	add.l	#4,sp

if it is a word sized add then eventually one day when by coinidence the stack
crosses a 64k boundary then when it does the add then the stack will become
trashed and the computer will crash.

The fix for this is simple - grep for add.w in src\hcc and find the appropriate
one and then change it to add.l

then recompile dlibs, then recompile all binaries.


Luke.