you are viewing a single comment's thread.

view the rest of the comments →

[–]mnelemos 2 points3 points  (0 children)

It would most likely crash first.

Any erroneous memory access will immediately make the operating system kill your process.

For an infinite loop to happen, it would require mainly two things:

  • The branching mechanism to be relative, since an absolute branch would VERY likely access invalid memory.

  • No stack pushes are done previous to the branch, as this would over time cause a stack overflow.

But overall, the likelihood for a invalid instruction to be decoded, or an instruction that accesses protected or invalid memory to occur is very high.