报错log:
--------- beginning of crash
01-01 08:01:17.963 3466 3466 F libc : FORTIFY: write: prevented read past end of buffer
01-01 08:01:17.964 3466 3466 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 3466 (sensors.qcom)
01-01 08:01:18.022 6943 6943 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-01 08:01:18.023 6943 6943 F DEBUG : Build fingerprint: 'chinachip/msm8952_64/msm8952_64:7.1.1/NMF26F/lmzhon05011035:userdebug/test-keys'
01-01 08:01:18.023 6943 6943 F DEBUG : Revision: '0'
01-01 08:01:18.023 6943 6943 F DEBUG : ABI: 'arm64'
01-01 08:01:18.023 6943 6943 F DEBUG : pid: 3466, tid: 3466, name: sensors.qcom >>> /system/bin/sensors.qcom <<<
01-01 08:01:18.023 6943 6943 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
01-01 08:01:18.025 6943 6943 F DEBUG : Abort message: 'FORTIFY: write: prevented read past end of buffer'
01-01 08:01:18.025 6943 6943 F DEBUG : x0 0000000000000000 x1 0000000000000d8a x2 0000000000000006 x3 0000000000000008
01-01 08:01:18.025 6943 6943 F DEBUG : x4 000000000000ffff x5 0000000000000000 x6 0080000080808080 x7 0000000000000010
01-01 08:01:18.025 6943 6943 F DEBUG : x8 0000000000000083 x9 ffffffffffffffdf x10 0000000000000000 x11 0000000000000001
01-01 08:01:18.025 6943 6943 F DEBUG : x12 ffffffffffffffff x13 0000000000000000 x14 0000000000000000 x15 00396d56d4c26ffe
01-01 08:01:18.025 6943 6943 F DEBUG : x16 0000007f7e53eed0 x17 0000007f7e4e8788 x18 00000000ffffffff x19 0000007f7ea28b40
01-01 08:01:18.025 6943 6943 F DEBUG : x20 0000000000000006 x21 0000007f7ea28a98 x22 0000000000000000 x23 0000007ff03feb20
01-01 08:01:18.025 6943 6943 F DEBUG : x24 0000000000000000 x25 00000055708fd000 x26 0000007ff03feb10 x27 0000000000000003
01-01 08:01:18.025 6943 6943 F DEBUG : x28 0000007ff03feb48 x29 0000007ff03fe790 x30 0000007f7e4e5c18
01-01 08:01:18.025 6943 6943 F DEBUG : sp 0000007ff03fe770 pc 0000007f7e4e8790 pstate 0000000060000000
01-01 08:01:18.033 6943 6943 F DEBUG :
01-01 08:01:18.033 6943 6943 F DEBUG : backtrace:
01-01 08:01:18.033 6943 6943 F DEBUG : #00 pc 000000000006b790 /system/lib64/libc.so (tgkill+8)
01-01 08:01:18.033 6943 6943 F DEBUG : #01 pc 0000000000068c14 /system/lib64/libc.so (pthread_kill+64)
01-01 08:01:18.033 6943 6943 F DEBUG : #02 pc 0000000000024180 /system/lib64/libc.so (raise+24)
01-01 08:01:18.033 6943 6943 F DEBUG : #03 pc 000000000001cbec /system/lib64/libc.so (abort+52)
01-01 08:01:18.033 6943 6943 F DEBUG : #04 pc 000000000002118c /system/lib64/libc.so (__libc_fatal+104)
01-01 08:01:18.033 6943 6943 F DEBUG : #05 pc 0000000000021120 /system/lib64/libc.so (__fortify_chk_fail+52)
01-01 08:01:18.034 6943 6943 F DEBUG : #06 pc 00000000000748cc /system/lib64/libc.so (__write_chk+108)
01-01 08:01:18.034 6943 6943 F DEBUG : #07 pc 0000000000036e6c /system/bin/sensors.qcom
01-01 08:01:18.034 6943 6943 F DEBUG : #08 pc 0000000000015ee4 /system/bin/sensors.qcom
01-01 08:01:18.034 6943 6943 F DEBUG : #09 pc 000000000001a7d8 /system/lib64/libc.so (__libc_init+88)
01-01 08:01:18.034 6943 6943 F DEBUG : #10 pc 00000000000164ec /system/bin/sensors.qcom
01-01 08:01:20.230 6950 6950 F libc : FORTIFY: write: prevented read past end of buffer
01-01 08:01:20.231 6950 6950 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 6950 (sensors.qcom)
根据报错,肯定是sensors.qcom引起的,我们在out目录查找该文件:
./out/target/product/msm8952_64/system/bin/sensors.qcom
./out/target/product/msm8952_64/symbols/system/bin/sensors.qcom
注意:
1.一个地方必须使用symbols目录下的sensors.qcom文件,否则解析不出来,其它的.so文件也是一样的必须使用该目录的文件!!!
2.so或者应用程序一定要是出问题版本,即使是同一个项目的不同软件都不能代替.
3.一定要用 backtrace的地址,否则解析出来的是问号!.
在根目录执行命令:
addr2line -C -f -e ./out/target/product/msm8952_64/symbols/system/bin/sensors.qcom 0000000000015ee4
结果:
sns_main_handle_ctl_sock
vendor/qcom/proprietary/sensors/dsps/sensordaemon/main/src/sns_main.c:1324