This is yet another way that running untrusted code inside the same JVM is a terrible mess. There's a lot of JVM state that gets "locked in" on first use (e.g. <clinit>) and a malicious bit of code could corrupt a LOT of shared data (like the post's mentioned string internment zone) even if you sanitize all of your inputs and outputs.
I wonder if you could do something nasty with this bug from inside an IntelliJ plugin...
I wonder if you could do something nasty with this bug from inside an IntelliJ plugin...