There are indeed two generic issues already identified:
- we cannot safely call TemplateInterpreter::_throw_StackOverflowError_entry
since the caller may not be interpreted
- if SP is modified in gen_c2i_adapter, it must be restored to allow the
stack walker to correctly parse the caller frame
This leads to different issues depending on the platform and on the JIT compiler used (failure to clean up the interpreter state, stack walking issues, oop parsing issues...).
In addition, for platforms which do not modify SP in gen_c2i_adapter, it might be safer to restore it anyway in case it has been modified by JSR292 adapters.