Quoth the VM spec concerning idiv:
"There is one special case that does not satisfy this rule: if the dividend is the negative integer of largest possible magnitude for the int type, and the divisor is -1, then overflow occurs, and the result is equal to the dividend. Despite the overflow, no exception is thrown in this case."
The included test case will divide its two arguments and print the result. For example:
[pizlo@dethklok test] java intdiv 6 3
Note the special case referred to by the VM spec:
[pizlo@dethklok test] java intdiv -2147483648 -1
But the RVM does not handle this correctly:
[pizlo@dethklok test] ~/Programs/RVM-trunk1/dist/FastAdaptiveGenMS_x86_64-linux/rvm intdiv -2147483648 -1
Exception in thread "MainThread" java.lang.ArithmeticException
It's clear that baseline is affected but opt is probably affected, too. It's likely that there are other such corner cases (for example for other types) that we're not handling correctly, either.