سؤال

I'm running custom android on i.MX51 board and observed a strange issue with an application.

I got logs in n logcat of segmentation fault of an application (native, written using NDK) :

03-19 15:26:46.763 I/DEBUG   ( 2234): pid: 2257, tid: 2257  >>> /usr/bin/powerMgr <<<
03-19 15:26:46.763 I/DEBUG   ( 2234): signal 8 (SIGFPE), code 0 (?), fault addr 000008d1

Even after this the application continued to run with same PID (2257) which I confirmed from both logcat and ps command. Is this possible ? If yes, how ??

هل كانت مفيدة؟

المحلول

That's not a segmentation fault (SIGSEGV, signal 11). You got a SIGFPE, signal 8, possibly as the result of an integer divide-by-zero. The signal handling didn't kill the process, so it just continued executing.

Many ARM CPUs lack hardware division instructions, so the SIGFPEis thrown explicitly from the software divide function. As a result you don't get a meaningful value in "fault addr".

The treatment of this has changed over time; newer versions of Android are a bit better about it.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top