Wait For It: Counted/Uncounted loops, Safepoints and OSR Compilation

from blog Psychosomatic, Lobotomy, Saw, | ↗ original
In this previous post about Safepoints I claimed that this here piece of code: Will get your JVM to hang and will not exit after 5 seconds, as one might expect from reading the code. The reason this happens, I claimed, is because the compiler considers for loops limited by an int to be counted, and will therefore not insert a safepoint poll into...