Frame verification (or perhaps is this already implemented?)
terminalsin opened this issue · comments
Hiya!
I'm currently working on obfuscation tests using SSVM. I would like to make the virtual machine panic when the stack frame does not meet the required one (similar to the JVM verification process). Would this be something possible to implement in SSVM perhaps? If so, could you point me towards how one would go about this?
Many thanks,
- Thibaut
I'm rewriting a lot of parts of stack/locals implementation, right now you would need to make your own ThreadStorage
and Stack
/Locals
implementation
It would be better to implement verifier like in HotSpot and make verification on class initialization.
Replying in case this is still relevant
On refactor branch:
VirtualMachine vm = new VirtualMachine();
vm.bootstrap();
...
JVMTIEnv env = vm.newJvmtiEnv();
env.setClassLink(klass -> {
// verification process
});
...