[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] vfork bug, help needed



Guido Flohr <gufl0000@stud.uni-sb.de> writes:

|> Hi,
|> 
|> sorry, for the attachment!
|> 
|> Somewhere either in the MiNTLib or in the kernel there is a bug in vfork.
|> Attached is a little test kit that reproduces the bug.  If you are good in
|> assembler you may be able to fix it.  I am not.

This is easy:

	movel	sp@, sp@-		| save return address; this is important!

This line is broken.  You cannot use *any* stack space for saving values.
That's why the Pvfork syscall explicitly preserves register a1 to use for
saving the return address.

So the proper fix is to revert back to the old version.

Andreas.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg