gpt4 book ai didi

android - 在 Android 中从 SDK 28 迁移到 SDK 29 后,我的应用程序崩溃并面临 : signal 11 (SIGSEGV), 代码 2 (SEGV_ACCERR),Android studio 3.4.1 中的错误

转载 作者:行者123 更新时间:2023-12-04 04:15:47 35 4
gpt4 key购买 nike

我只在使用 Android 操作系统版本 10 的 OnePlus、三星、Poco F1 中遇到此问题。

它适用于搭载 Android 10 的 Pixel 设备。

请在下面找到错误日志


Build fingerprint: 'Xiaomi/beryllium/beryllium:10/QKQ1.190828.002/V11.0.6.0.QEJMIXM:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2020-03-16 18:10:34+0530
pid: 2594, tid: 2737, name: JavaBridge >>> com.mymobile<<<
uid: 10362
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x7188e089db
Cause: execute-only (no-read) memory access error; likely due to data in .text.
x0 0000000000000100 x1 000000705d3f2fb0 x2 0000000000000000 x3 0000000000000008
x4 00000000000000e2 x5 000000705d3fbd60 x6 000000705d3fbd60 x7 707265676e69662e
x8 0000007188e089d4 x9 0000000000000000 x10 0000000000000007 x11 0000000000000000
x12 0000000000000000 x13 0000000000000001 x14 000000705d3f2f58 x15 000000705d3f4bcc
x16 00000060a530d558 x17 0000007188e0ae20 x18 000000001ba3a243 x19 000000705d3f7038
x20 0000000000000001 x21 000000705d3f4188 x22 000000705d3f6f1c x23 0000000000000002
x24 0000000000000002 x25 0000007081ea45b0 x26 000000710786b8b0 x27 0000000000000005
x28 0000000000000001 x29 000000705d3f6f90
sp 000000705d3f31e0 lr 000000708c9058d8 pc 000000708c9063d8

backtrace:
#00 pc 00000000000053d8 /data/app/com.mymobile-_0ls0Aom7N8BP86o4bZVYQ==/lib/arm64/libag3.so (BuildId: 25ee893fb2620c6009ca1a6ef581e24e27c00a36)
#01 pc 000000000000c2c4 /data/app/com.mymobile-_0ls0Aom7N8BP86o4bZVYQ==/lib/arm64/libag3.so (BuildId: 25ee893fb2620c6009ca1a6ef581e24e27c00a36)
#02 pc 000000000002b0d4 /data/app/com.mymobile-_0ls0Aom7N8BP86o4bZVYQ==/lib/arm64/libag3.so (Java_com_apiguard3_signals_NdkManager_collectSignal+196) (BuildId: 25ee893fb2620c6009ca1a6ef581e24e27c00a36)
#03 pc 00000000000b90fc /data/app/com.mymobile-_0ls0Aom7N8BP86o4bZVYQ==/oat/arm64/base.odex (art_jni_trampoline+236)
#04 pc 0000000000136334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
#05 pc 0000000000144fec /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
#06 pc 00000000002e27cc /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
#07 pc 00000000002dda2c /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+892) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
#08 pc 00000000005a20b0 /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+424) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
#09 pc 0000000000130914 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
#10 pc 0000000000de4afa /data/app/com.mymobile-_0ls0Aom7N8BP86o4bZVYQ==/oat/arm64/base.vdex (com.apiguard3.signals.NdkManager.b0414ДДДД0414+20)
#11 pc 00000000002b3ae0 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.17460956533834400288+240) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
#12 pc 00000000005912f0 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
#13 pc 000000000013f468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
#14 pc 0000000000136334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
#15 pc 0000000000144fec /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JVal

谁能帮忙解决这个问题提前致谢

最佳答案

此次崩溃的根本原因是 Android 10 的行为变化。请参阅以下页面以了解问题: https://developer.android.com/about/versions/10/behavior-changes-all https://developer.android.com/about/versions/10/behavior-changes-all

总的来说,问题是:从 Android 10 开始,系统二进制文件和库的可执行段被映射到内存中只执行(不可读),作为一种针对代码重用攻击的强化技术。如果您的应用对标记为只执行的内存段执行读取操作——无论是来自错误、漏洞还是有意的内存检查——系统都会向您的应用发送 SIGSEGV 信号。

作为解决方法,它说调用“mprotect”来执行发生崩溃的方法。您可以引用此处了解如何调用此方法: https://man7.org/linux/man-pages/man2/mprotect.2.html

我会说实现此解决方法非常烦人,因为它添加了额外的系统调用并且一点也不方便。但是我没有看到更好的方法。

关于android - 在 Android 中从 SDK 28 迁移到 SDK 29 后,我的应用程序崩溃并面临 : signal 11 (SIGSEGV), 代码 2 (SEGV_ACCERR),Android studio 3.4.1 中的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60720511/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com