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

[MiNT] Dangerous assumption in MINT lib



Hi!

While searching a bug in MiNT lib, causing a crash when register a0 is
altered by a GEMDOS call (this bug is fixed, Frank has the diff), I found a
"documented" but dangerous assumption in vfork.cpp:
-------------------------------- >8 schnipp 8<
--------------------------------
| vfork for MiNT. Note that the return address must be popped off the stack,
| or else it could be clobbered by the child and the parent would be left
| returning to la-la land. Also note that MiNT guarantees that register a1
| will be preserved across a vfork() system call.
-------------------------------- >8 schnapp 8<
--------------------------------
Nice that MiNT guarantees that a1 will be preserved, but what about other
programs hanging in the GEMDOS trap?
I think this should be fixed because a program altering a1 will make the
child and parent process "returning to la-la land"

Comments?

Bye

                Joerg