mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-05 05:35:07 +01:00
Add ScopedStackBlocker
to RomFile.populate
We needed to block stack frame lookups past JNI code as Java doesn't follow the ARMv8 frame pointer ABI which leads to invalid pointer dereferences. Any JNI function that throws or handles exceptions must do this now or it may lead to a `SIGSEGV`.
This commit is contained in:
parent
68e693d9f4
commit
1878e582ad
@ -13,6 +13,8 @@
|
||||
#include "skyline/jvm.h"
|
||||
|
||||
extern "C" JNIEXPORT jint JNICALL Java_emu_skyline_loader_RomFile_populate(JNIEnv *env, jobject thiz, jint jformat, jint fd, jstring appFilesPathJstring, jint systemLanguage) {
|
||||
skyline::signal::ScopedStackBlocker stackBlocker;
|
||||
|
||||
skyline::loader::RomFormat format{static_cast<skyline::loader::RomFormat>(jformat)};
|
||||
|
||||
skyline::Logger::SetContext(&skyline::Logger::LoaderContext);
|
||||
|
Loading…
Reference in New Issue
Block a user