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

[MiNT] Current beta problems - solved



Hi Thomas!

TB>Apply the following diff if you want to fix it yourself:
Ah, thank you!
[little bit later]
Yes, works fine now

TB>2. The problem with e.g. Mines is caused by the new syscall handler,
I suspected this :-(

TB>which doesn't preserve registers a0-a2 like the old one did.
Yes, a0 and a1 are modified

TB>Nevertheless, especially because the new handler already contains
TB>workarounds for some calls because of bugs in older versions of the
TB>MiNT library, I'd opt for always saving a0-a2 across GEMDOS
TB>calls (like my patched kernel currently does, which runs Mines just
TB>perfectly), it would also make the special workarounds unnecessary.
Let me have a guess:
Your version is not reentrant.
(May I have a diff?)

The reentrancy (which is needed for background DMA) is the reason why I
sacrified preserving a0 and a1 (and that's also the reason why the
workarounds are the way they are)

OK, I think with some additional code (hmm, I also wanted to tidy up the
handler and make it fast :-( ) there's a chance to preserve a1 too. But I
don't see a chance for a0

I opt for using something like saveregs if someone wants to use a program
that has such a bug. The main reason therefore is that I don't like programs
to have workarounds for this and that and something else and ...
I prefer external workarounds because they can easily be removed if not
neccessary and they do not complicate the code of the program which also is
(a little bit) faster and smaller without them

TB>Not preserving these registers can cause serious crashes because
TB>currently, they'll contain addresses within the kernel when returning
TB>from a call, so a buggy program that assumes the register wasn't
TB>touched will overwrite parts of the kernel.
Well, setting these registers to other (less dangerous) values shouldn't be a
problem (that should also be done to not pass kernel internal information to
the application). OK, that won't make this buggy applications run, but it can
prevent them from killing the kernel

TB>That was the case with Mines, and I'm sure there's more stuff like
TB>that outside.
I thought most of the dirty stuff relies on an unmodified a2.

Bye

                Joerg

PS: If someone knows other programs with these bug, please mail me!