c - Boehm GC android sigsegv on load_gc

标签 c android-ndk boehm-gc

我在 Android x86 上的 Boehm 中遇到奇怪的崩溃(但 arm 工作正常);它正在崩溃:

deferred = *(word *)limit;

与:

LogCat: I/DEBUG ( 6453): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xa31f8

它总是在相同的地址 (0xa31f8) 失败;现在这可能是我做错了什么。这是一种自定义语言,我只是链接到 libc.so。什么可能导致这种情况?

日志:

LogCat: I/BDWGC ( 7930): Grow heap to 64 KiB after 0 bytes allocated

LogCat: D/BDWGC ( 7930): Creating thread 0xb7795160

LogCat: D/BDWGC ( 7930): Stopping the world from 0xb7795160

LogCat: D/BDWGC ( 7930): World stopped from 0xb7795160

LogCat: D/BDWGC ( 7930): Pushing stacks from thread 0xb7795160

LogCat: D/BDWGC ( 7930): Stack for thread 0xb7795160 = [0xbf90be1c,0xbf90f000) LogCat: F/libc ( 7930): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xa31f8 in tid 7930 (ksample.oxygene)

回溯:

(gdb) bt

#0 0xa502c9ad in GC_mark_from (mark_stack_top=0xb8b30010, mark_stack=0xb8b30000, mark_stack_limit=0xb8b38000) at mark.c:853

#1 0xa502c1d0 in GC_mark_some (cold_gc_frame=0xbf90beec "l¿\220¿Hò\001¥ì¾\220¿") at mark.c:409

#2 0xa501f248 in GC_stopped_mark (stop_func=0xa501e420 ) at alloc.c:702

#3 0xa501eed2 in GC_try_to_collect_inner (stop_func=0xa501e420 ) at alloc.c:488

#4 0xa50254ff in GC_init () at misc.c:1288

最佳答案

用于 Android 的 boehm-gc 中存在一个错误,导致使用未映射的内存区域注册数据根(因此在 GC 初始化期间导致 SIGSEGV/SEGV_MAPERR)。 现在是fixed .

关于c - Boehm GC android sigsegv on load_gc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45695678/

相关文章:

c - Boehm GC如何为C程序工作?

c - 如何分配包含可变长度数组的结构?

c - 如何为 Delphi/Free Pascal/Lazarus DLL 创建 C-Header - 数据类型

c - 为什么 coverity 会为此发出警告?

Android JNI ndk-构建错误 : 'jni' has not been declared

c - 伯姆GC : how to effectively debug smashed heap objects?

c++ - Boehm GC++ 垃圾收集器 : Too many heap sections Increase MAXHINCR or MAX_HEAP_SECTS

c - 从测试中的何处创建临时文件

android - JNI 在应用程序中检测到错误 : JNI FindClass called with pending exception java. lang.NoSuchMethodError:没有非静态方法“Lchirpconnect/SDK

android - javah 找不到我的类