Similarly, during debugging always set your emulator, simulator, or whatever to break on any access to unused locations. This is always a sign of a latent problem. I often hear from folks whose software runs fine from system ROM but not from emulator RAM, a sure sign of rogue code that is writing into code space. Really complex loops always hold potential for locking up a system. The world is indeed growing ever more complex, and our embedded systems reflect this.
Some equipment solves torturously difficult series of equations before producing a result.
Often, iterative instead of deterministic algorithms are used to reduce matrices or converge a series or integral. Sometimes iterative solutions can actually start to diverge, rather than converge, making a solution impossible. Iterative algorithms are fine as long as the software is smart enough to detect that a solution is unlikely, and then give the user some options. Locking up into an infinite loop is always unacceptable. Worse, even the software-controlled power switch wouldn't work when stuck in this loop.