bionic_setjmp_checksum_mismatch 处的 Sigabrt 错误

Sigabrt error at bionic_setjmp_checksum_mismatch

我 运行 遇到 运行 本机代码的问题。应用程序 运行 直到它到达代码中的 1 个位置然后崩溃。我确实从调试器收集了堆栈转储和一些 logcat 信息。

我在可能崩溃的代码处设置了断点。

这是崩溃的地方

cgs.media.charsetShader     = trap_R_RegisterShader("gfx/2d/hudchars");

Logcat 给我看了这个:

libc : setjmp checksum mismatch

现在从 stak 转储:

tgkill 0x0000007f8d7cb558
pthread_kill 0x0000007f8d7c89e0
raise 0x0000007f8d783f2c
abort 0x0000007f8d77c9b0
__libc_fatal 0x0000007f8d780f38
__bionic_setjmp_checksum_mismatch 0x0000007f8d77c648
___lldb_unnamed_symbol4675$$libetl.so 0x0000007f6cc85b90
jpeg_CreateDecompress 0x0000007f6cccaaa8
___lldb_unnamed_symbol4677$$libetl.so 0x0000007f6cc85cf4
___lldb_unnamed_symbol4860$$libetl.so 0x0000007f6ccb6054
___lldb_unnamed_symbol4861$$libetl.so 0x0000007f6ccb62d4
___lldb_unnamed_symbol4578$$libetl.so 0x0000007f6cc6feec
___lldb_unnamed_symbol4582$$libetl.so 0x0000007f6cc702ac
___lldb_unnamed_symbol1031$$libetl.so 0x0000007f6ca304ac
___lldb_unnamed_symbol736$$libetl.so 0x0000007f6ca0baa8
___lldb_unnamed_symbol1025$$libcgame.mp.arm64-v8a.so 0x0000007f3dfbd774
___lldb_unnamed_symbol447$$libcgame.mp.arm64-v8a.so 0x0000007f3df55f68
___lldb_unnamed_symbol1024$$libcgame.mp.arm64-v8a.so 0x0000007f3dfbd680
___lldb_unnamed_symbol622$$libcgame.mp.arm64-v8a.so 0x0000007f3df75e8c
vmMain 0x0000007f3df6e064
___lldb_unnamed_symbol743$$libetl.so 0x0000007f6ca0c4c8
___lldb_unnamed_symbol1033$$libetl.so 0x0000007f6ca32024
___lldb_unnamed_symbol1246$$libetl.so 0x0000007f6ca43b9c
___lldb_unnamed_symbol273$$libetl.so 0x0000007f6c9dd3c0
___lldb_unnamed_symbol277$$libetl.so 0x0000007f6c9dd9c4
___lldb_unnamed_symbol1314$$libetl.so 0x0000007f6ca4d7ec
___lldb_unnamed_symbol1318$$libetl.so 0x0000007f6ca4e480
___lldb_unnamed_symbol1254$$libetl.so 0x0000007f6ca45528
___lldb_unnamed_symbol508$$libetl.so 0x0000007f6c9f6648
___lldb_unnamed_symbol509$$libetl.so 0x0000007f6c9f6820
___lldb_unnamed_symbol209$$libetl.so 0x0000007f6c9d8eb4
___lldb_unnamed_symbol1648$$libetl.so 0x0000007f6ca6e7f8
SDL_main 0x0000007f6ca6e904
Java_org_libsdl_app_SDLActivity_nativeRunMain 0x0000007f7012f8c8
art_quick_generic_jni_trampoline 0x0000007f8aa50d94
art_quick_invoke_static_stub 0x0000007f8aa47a6c
art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*) 0x0000007f8aa544b4
art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x0000007f8ac05640
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x0000007f8abfe61c
bool art::interpreter::DoInvoke<(art::InvokeType)0, false, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x0000007f8ac31230
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x0000007f8ac24440
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x0000007f8abd79e0
art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*) 0x0000007f8abdd6d8
bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x0000007f8abfe600
bool art::interpreter::DoInvoke<(art::InvokeType)4, false, false>(art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) 0x0000007f8ac309ec
art::JValue art::interpreter::ExecuteSwitchImpl<false, false>(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x0000007f8ac24690
art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool) 0x0000007f8abd79e0
artQuickToInterpreterBridge 0x0000007f8aec19b4
art_quick_to_interpreter_bridge 0x0000007f8aa50eb0
art_quick_invoke_stub 0x0000007f8aa477b8
art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*) 0x0000007f8aa54484
art::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::ArgArray*, art::JValue*, char const*) 0x0000007f8ada148c
art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*) 0x0000007f8ada2794
art::Thread::CreateCallback(void*) 0x0000007f8adc1f28
__pthread_start(void*) 0x0000007f8d7c81e8
__start_thread 0x0000007f8d77dbc4

我不是从堆栈读取转储的专家。 我知道它显示内存地址。

PS:我也做了一些挖掘并检查了 trap_R_RegisterShader。程序甚至不进入该功能。它就停在了那里。

我不确定如何处理 jpeg_CreateDecompress 0x0000007f6cccaaa8 是否有意?

已在 https://github.com/etlegacy/etlegacy/commit/e3cfd59d2ca080b0fd5208ec8f9c275a6e0e50dc

中修复

setjmp 未设置为第一个,这导致 jpeg_create_decompress 将 longjmp 发送到不存在的 jmp