[gccsdk] Threading + Alt-Break = Trashed Computer

Rien Mertens rien.mertens at hccnet.nl
Fri Jul 11 23:35:47 PDT 2008

In message <op.ud5cm4w8l0n5eg at balaptop.ba>
          "Ben Avison" <bavison at riscosopen.org> wrote:

> You know what, I think this looks like a Wimp bug. The fact that the Watchdog
> was doing a primitive task switch and then calling OS_Exit had me wondering
> about how come the correct exit handler was called - the answer seems to be
> it isn't. As a quick test, I used the following BASIC program:
>   10 SYS "OS_ChangeEnvironment",11,&10000000
> Run the program, do Alt-Break, kill the task itself (task "Unknown"), result
> is prefetch abort at &10000004, as expected. Now try again, this time click
> "Next task" to select another task, kill that instead, result is a stiffed
> machine. This indicates that the environment isn't being switched and the
> Wimp is doing a poor job of recovering from the error.
> Presumably in the UnixLib case, the task that was running when the Break
> key event goes off only has the default Wimp exit handler installed. This
> wouldn't directly cause an abort, but it would have the effect that the
> UnixLib exit handler is bypassed and so its filters don't get removed.
> If this is as true as it appears, I'm amazed such a fundamental bug in the
> Watchdog has gone unnoticed as long as it has!
> Ben

I my opinion this might very well be related to the newer RISC OS 
versions; my RiscPC with RO4.02 does a better job to recover from an 
error with ALT_Break than my A9Home with RO4.42, which is much less 
successful in recovering with ALT_Break. It often fails and results in 
a a stiffed machine without the keyboard or mouse usable anymore,
b or a machine that can only be reset with the choice CTRL-Break or 
red button..

Rien Mertens
Tweeberg 1 A
5246 XL Rosmalen       0031(0)736415517

More information about the gcc mailing list