Repository navigation
feat: 启动层直启——JNI_CreateJavaVM 替代 JLI_Launch,退出路径收敛为 JVM option hook - #1986
Closed
ShirosakiMio wants to merge 1 commit into
Closed
ShirosakiMio wants to merge 1 commit into
ShirosakiMio wants to merge 1 commit into
Conversation
- jre_launcher.c 重写:dlsym JNI_CreateJavaVM 直启游戏 JVM 并 CallStaticVoidMethod 调用 mio.Wrapper,SIGABRT pipe waiter 退役 - 退出/abort 经 JVM 调用 API 标准 exit/abort JavaVMOption hook 接管:hook 记录退出码 后 futex 唤醒 waiter 并原地停车,waiter 经 nominal_exit 走 ART 侧 FCLBridge.onExit (非 0 弹 JVMCrashActivity,0 走 System.exit),进程终止权收归启动器 - bytehook exit 拦截保留作外部 native exit() 兜底,sdl_hook/chmod_hook 不变 - FCLauncher.launch() 参数三段拆分:classpath 改以 -Djava.class.path 传递, 主类与应用参数分离 - MuMu 实测:JRE8(1.12.2)/JRE21(1.21.1)/JRE25(26.2) 直启、正常退出、 崩溃上报(SIGSEGV→code 6→CrashActivity)链路均通过
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动内容
对齐 MojoLauncher 已验证的启动层方案核心,把 pojav 时代的 JLI_Launch 三层退出 hack 收敛为一条 JVM 官方通道:
jre_launcher.c重写:不再经 JLI_Launch,dlsym(RTLD_DEFAULT) JNI_CreateJavaVM直启游戏 JVM 并CallStaticVoidMethod调用 mio.Wrapper(classpath 以-Djava.class.path传递,主类/应用参数分离);SIGABRT pipe waiter(handler 里 while(1) 空转)退役VMLauncher签名改三参,FCLauncher.launch()参数三段拆分(三条 launch 链路共用一处)实测(MuMu x86_64)
* 1.21.1 在该模拟器上有预存的 GPU 编码层崩溃(hs_err 4 份均在本次改动前、同一崩点 glTexImage2D→memmove),恰好被用来完整验证了崩溃上报链路。
说明
a41ed621 feat: SFPEW 自动选择 EGL Context 模式(同工作区落在本分支上)