嗨,伙计们,我没有太多的 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 调试器获取故障转储。
Settings > Developer options > enable USB debugging
Android Studio > Tools> SDK Manager > Android SDK > SDK Tools > Android SDK Platform-Tools
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/