c++ - Android native libc signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr -
i've been experiencing crash after adding following code:
class audiopolicyservice : public binderservice<audiopolicyservice>, public bnaudiopolicyservice, public ibinder::deathrecipient { friend class binderservice<audiopolicyservice>; //[....] class testingclz : public virtual refbase { public: testingclz (string8 name, const wp<audiopolicyservice>& service){} virtual testingclz() {} }; sp<testingclz> mtestingclz; } // end of class audiopolicyservice //[....] void audiopolicyservice::onfirstref() { ... testingclz = new testingclz(string8("test"), this); }
i got following crash:
02-03 22:21:17.971 367 367 f debug : revision: '0'
02-03 22:21:17.971 367 367 f debug : abi: 'arm'
02-03 22:21:17.971 367 367 f debug : pid: 981, tid: 981, name: mediaserver >>> /system/bin/mediaserver <<<
02-03 22:21:17.972 367 367 f debug : signal 11 (sigsegv), code 2 (segv_accerr), fault addr 0xb6e594d8
02-03 22:21:17.976 367 367 f debug : r0 b6e594d8 r1 becfa970 r2 00000000 r3 b6e4d812
02-03 22:21:17.976 367 367 f debug : r4 b5fd6a1c r5 becfa970 r6 becfa96c r7 b5fd69d4
02-03 22:21:17.976 367 367 f debug : r8 becfa968 r9 b6ad8e2d sl 00000000 fp becfabbc
02-03 22:21:17.976 367 367 f debug : ip b6b0ec24 sp becfa958 lr b6b03849 pc b6b03604 cpsr 80010030
02-03 22:21:17.980 367 367 f debug :
02-03 22:21:17.980 367 367 f debug : backtrace:
02-03 22:21:17.980 367 367 f debug : #00 pc 0000e604 /system/lib/libutils.so (android::refbase::weakref_type::incweak(void const*)+11)
02-03 22:21:17.980 367 367 f debug : #01 pc 0000e845 /system/lib/libutils.so (android::refbase::createweak(void const*) const+6)
02-03 22:21:17.980 367 367 f debug : #02 pc 000060ad /system/lib/libaudiopolicyservice.so
02-03 22:21:17.980 367 367 f debug : #03 pc 0000620b /system/lib/libaudiopolicyservice.so
02-03 22:21:17.980 367 367 f debug : #04 pc 0000232d /system/bin/mediaserver
02-03 22:21:17.980 367 367 f debug : #05 pc 00001b8f /system/bin/mediaserver
02-03 22:21:17.981 367 367 f debug : #06 pc 00017359 /system/lib/libc.so (__libc_init+44)
02-03 22:21:17.981 367 367 f debug : #07 pc 00001e0c /system/bin/mediaserver
02-03 22:21:18.088 367 367 f debug :
02-03 22:21:18.088 367 367 f debug : tombstone written to: /data/tombstones/tombstone_01
after mapping address line, points lines out of change. segv_accerr
means invalid permissions mapped object. wondering whether caused android mprotect? doesn't seem normal crash. have experienced same failure? lot!
update: ok, seems crash not happening if make whole build , flash system&boot images. so, make android native service change, we'll need full build?
denon
result: seems crash not happening if make whole build , flash system&boot images. however, still wondering if there's protection mechanism record , verify class size @ run-time. seems binary address mapping still not updated if replace .so lib.
thanks further information!
Comments
Post a Comment