On Tue, Aug 4, 2009 at 6:58 PM, Todd Volkert<[email protected]> wrote:
> Very curious.  That's one of those "that should never happen" bugs...

Well, people who knows me well, would say it is "Niclas Phenomenon",
i.e. anything I touch will break, even if it can't. Bugs have an
incredible tendency to show up in my face, and I am no longer
surprised.

Anecdote;

On Intel8032, way back in 1984 or so, we had a problem in our
real-time OS that it crashed mysteriously every now and so often. I
reduced the OS down to absolute minimum, and finally I isolated a
problem even in the following code snippet.

loop: jmp loop   ; Do nothing

timer0: reti     ; Return from interupt

serial1: reti    ; return from interupt

After initializing the CPU, just stand in an empty loop, if timer or
serialport interrupt occurs, just return without anything.
THAT didn't work. Failure description; If both the serial and timer
interrupt occurred on the same clock cycle, only one return address
would be pushed to the stack, but both interrupt routines would
execute, and hence popping incorrectly. Intel denied the problem, but
in a newer revision of the CPU, they had fixed the problem.

Funny enough, in 1997 I found exactly the same problem in the PIC
processors, and in that case there was a software work-around, unlike
the Intel case.


Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

Reply via email to