2 ms·
This was the late 1980s. A 680x0. Instruction re-ordering was not yet a thing. But it was definitely a compiler bug either way. There was a POP (or maybe it
by lisper 6y ago
This was the late 1980s. A 680x0. Instruction re-ordering was not yet a thing.
But it was definitely a compiler bug either way. There was a POP (or maybe it was an UNLK) instruction, followed by a dereference of the PREVIOUS value of SP. That was bound to fail on any architecture that used the current process stack to handle interrupts. It just so happened that most of the development of both the compiler and the application code was being done on unix machines, which happens not to be such an architecture (interrupts are handled on the kernel stack) and so the bug never manifested itself there. But such architectures were common then, and are still common in embedded systems today.