android - A/libc : Fatal signal 11 (SIGSEGV), 代码 2 (SEGV_ACCERR),tid 22188 中的故障地址 0x708d31bd64

标签 android

嗨,伙计们,我没有太多的 Android 经验,但我接到了一项让我很难过的任务。我收到错误

A/libc: Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x708d31bd64 in tid 22188 
当我尝试将我的应用程序安装到 Galaxy Note 9 时会发生这种情况在 Android 10 上运行.我正在使用 Android Studio 4.1 R3 .我整天都在寻找答案,我最接近的是来自 https://github.com/facebook/react-native/issues/29517 .
据我所知,此错误仅适用于 Android 10 及更高版本,我需要禁用 Execute Memory Only (XOM)或使用 mprotect()某处。如 https://source.android.com/devices/tech/debug/execute-only-memory#disabling 中所示,我需要执行以下任一操作:
// Android.mk
LOCAL_XOM := false

// Android.bp
cc_binary { // or other module types
   ...
   xom: false,
}
那么我的问题是Android.mk 在哪里?和 Android.bp ?我无法在我的项目中找到这两个文件。
或者
If code introspection is necessary on executable code sections, first call mprotect to mark the code readable. Then after the operation is complete, call mprotect again to mark it unreadable.
你具体怎么用mprotect() ?我找不到任何显示其用法的明确示例。

最佳答案

Android 10 似乎在基于 Arm64 的架构上存在问题。哪个给你Execute-only memory violation对于一些图书馆。 https://source.android.com/devices/tech/debug/native-crash
您可以通过以下方式找到有关问题根源(给出问题的库)的更多详细信息:
使用 Android 调试器获取故障转储。

  • 在 Android 设备上导航至 Settings > Developer options > enable USB debugging
  • 使用 USB 将 Android 设备连接到计算机
  • 下载Android SDK平台工具:Android Studio > Tools> SDK Manager > Android SDK > SDK Tools > Android SDK Platform-Tools
  • 如果在 Windows 上导航到 - C:\Users\[user]\AppData\Local\Android\sdk\platform-tools如果在 mac 上导航到 /Users/[user]/Library/Android/sdk/platform-tools
  • 运行应用程序并使应用程序崩溃
  • 从终端运行:./adb logcat -v threadtime -d > /path_to_random_text_file_for_crash_dump/test.txt

  • 更详细的错误应该在 test.txt 中。 .
    同样,我无法确认这将有助于解决您的问题,但这对我有帮助。对我来说,我相信它是在旧版本 3.1.x 上运行的 Twilio,而不是新版本。

    关于android - A/libc : Fatal signal 11 (SIGSEGV), 代码 2 (SEGV_ACCERR),tid 22188 中的故障地址 0x708d31bd64,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64582600/

    相关文章:

    android - 保持 Android Studio 的特定依赖项顺序

    javascript - Mongodb 到 Android 应用程序

    android - 如何在EditText中添加两个drawableRight?

    android - 使用Android SDK生成类图Eclipse

    android - 编译与编译树与编译文件之间的区别?

    android - Gradle无法解析文件

    android - 使用 Android 的 SoundPool 类播放音频文件序列

    java - 从另一个线程在主线程中运行代码

    android.util.Patterns.EMAIL_ADDRESS 正在验证无效的电子邮件

    Android R 已被 eclipse 删除