2015年2月6日 星期五

Fatal signal 11(SIGSEGV) at 0xDEADBAAD(code=1)

Recent days, I develop an android app which need to use an open-source native library.

After running app on the target smart phone, some errors always happen when access the native code..

such as,

ABORTING: LIBC: ARGUMENT IS INVALID HEAP ADDRESS IN dlfree addr=0x769c6df8

Fatal signal 11(SIGSEGV) at 0xDEADBAAD(code=1), thread 

or

ABORTING: LIBC: ARGUMENT IS INVALID HEAP MEMORY CORRUPTION IN dlmalloc 

After searched some related information from StackOverflow and google..

Below is some possible reasons which direct me to the correct way for debug.

1. A function call being made from two different threads at the same time.

2. It is related to device's memory error. (Such as no malloc and call free in native code.)

3. About the 0xDEADBAAD error message. 0xDEADBAAD is used by the Android libc abort()             frunction when native heap corruption is detected.

In my case, following above hints, finally I found the root cause is memory align issue.

Terrible days...


沒有留言:

張貼留言