Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

so中访问了env->NewDirectByteBuffer(buffer, _capacity)出现异常,求各位大佬帮忙看一下 #674

Open
winnerMaster1 opened this issue Sep 10, 2024 · 1 comment

Comments

@winnerMaster1
Copy link

代码如下,麻烦各位大佬看一下:
jobject NativeByteBuffer::getJavaByteBuffer() {
if (javaByteBuffer == nullptr && javaVm != nullptr) {
JNIEnv *env = 0;
if (javaVm->GetEnv((void **) &env, JNI_VERSION_1_6) != JNI_OK) {
if (LOGS_ENABLED) DEBUG_E("can't get jnienv");
exit(1);
}
javaByteBuffer = env->NewDirectByteBuffer(buffer, _capacity);

unidbg执行报定位到这个异常中
Pointer _NewDirectByteBuffer = svcMemory.registerSvc(new Arm64Svc() {
@OverRide
public long handle(Emulator<?> emulator) {
throw new UnsupportedOperationException();
}
});

@winnerMaster1 winnerMaster1 changed the title so中访问了env->NewDirectByteBuffer(buffer, _capacity)出现异常,求各位大佬解决 so中访问了env->NewDirectByteBuffer(buffer, _capacity)出现异常,求各位大佬帮忙看一下 Sep 10, 2024
@zhaodice
Copy link
Contributor

unidbg有好多东西没实现,遇到throw new UnsupportedOperationException();这种情况你只能自己补咯。

毕竟不可能都补完,要不然不就变成Unidbg OS 了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants