mirror of
https://github.com/LSPosed/LSPlant.git
synced 2025-05-04 20:42:02 +08:00
Fix the SIGSEGV caused by premature initialization of ClassLinker (#137)
ClassLinker should be initialized after Class because FixupStaticTrampolines references Class::GetClassDef, causing a SIGSEGV.
This commit is contained in:
parent
90d8d433d4
commit
8c3c6e6b2c
@ -268,14 +268,14 @@ bool InitNative(JNIEnv *env, const HookHandler &handler) {
|
|||||||
LOGE("Failed to init thread");
|
LOGE("Failed to init thread");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!ClassLinker::Init(handler)) {
|
|
||||||
LOGE("Failed to init class linker");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!Class::Init(handler)) {
|
if (!Class::Init(handler)) {
|
||||||
LOGE("Failed to init mirror class");
|
LOGE("Failed to init mirror class");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!ClassLinker::Init(handler)) {
|
||||||
|
LOGE("Failed to init class linker");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!ScopedSuspendAll::Init(handler)) {
|
if (!ScopedSuspendAll::Init(handler)) {
|
||||||
LOGE("Failed to init scoped suspend all");
|
LOGE("Failed to init scoped suspend all");
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user