signal 6 (SIGABRT), code -6 (SI_TKILL) Abort message: ‘stack corruption detected (-fstack-protector
在测试调用native的rw_i93.cc文件的rw_i93_sm_format函数时,出现程序crash,报错信息如下
12-18 11:19:39.056 1453 2114 I WifiStateMachine: checkScoreBasedQuality - mPreviousScore[0]:81 mPreviousScore[1]:81 mPreviousScore[2]:81 s2Score:80mPrevoiusScoreAverage:81
12-18 11:19:39.113 18417 18417 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
12-18 11:19:39.115 1066 1066 I /system/bin/tombstoned: received crash request for pid 18414
12-18 11:19:39.118 18417 18417 I crash_dump64: performing dump of process 18414 (target tid = 18414)
12-18 11:19:39.138 18417 18417 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-18 11:19:39.139 18417 18417 F DEBUG : Build fingerprint: 'samsung/dreamqltezc/dreamqltechn:9/PPR1.180610.011/G9500ZCS6DTJ1:user/release-keys'
12-18 11:19:39.139 18417 18417 F DEBUG : Revision: '12'
12-18 11:19:39.139 18417 18417 F DEBUG : ABI: 'arm64'
12-18 11:19:39.139 18417 18417 F DEBUG : pid: 18414, tid: 18414, name: ServiceHandlerB >>> com.weiqing.wheeljack:CaseHandlerService <<<
12-18 11:19:39.139 18417 18417 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
12-18 11:19:39.139 18417 18417 F DEBUG : Abort message: 'stack corruption detected (-fstack-protector)'
12-18 11:19:39.139 18417 18417 F DEBUG : x0 0000000000000000 x1 00000000000047ee x2 0000000000000006 x3 0000000000000008
12-18 11:19:39.139 18417 18417 F DEBUG : x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000030
12-18 11:19:39.139 18417 18417 F DEBUG : x8 0000000000000083 x9 6b3556791e691e70 x10 0000000000000000 x11 fffffffc7ffffbdf
12-18 11:19:39.139 18417 18417 F DEBUG : x12 0000000000000001 x13 000000005fdc1fca x14 0039d2de21f52580 x15 0000591ef0ff6dfc
12-18 11:19:39.139 18417 18417 F DEBUG : x16 0000007418a192a0 x17 0000007418939f24 x18 6b3556791e691e70 x19 00000000000047ee
12-18 11:19:39.139 18417 18417 F DEBUG : x20 00000000000047ee x21 0000000000000000 x22 0000007379f08984 x23 0000007379dd1f33
12-18 11:19:39.139 18417 18417 F DEBUG : x24 0000007379f37a30 x25 000000737b9f3588 x26 0000007379f35a68 x27 6b3556791e691e70
12-18 11:19:39.139 18417 18417 F DEBUG : x28 000000737b9f16f0 x29 000000737b9f1570
12-18 11:19:39.139 18417 18417 F DEBUG : sp 000000737b9f1530 lr 000000741892c304 pc 000000741892c32c
12-18 11:19:39.161 1453 2113 D WifiPermissionsUtil: canAccessScanResults: pkgName = android, uid = 1000
12-18 11:19:39.162 2194 2194 D SecStatusBarWifiView: updateState: WifiIconState(resId=2131232630, visible=true, activityId=2131232635)
最后发现是因为编译器开启了GCC “stack smashing detected”机制(堆栈保护程序。堆栈保护程序是由编译器生成并放入程序中的代码),用来访者“栈溢出”。如果使用-fstack protector进行编译,那么在堆栈上分配的空间会多一点,在进入和返回函数时,代码会设置检查,然后在函数中实际检查是否覆盖了堆栈。这将对你的申请产生影响。如果启用,它将迅速阻止堆栈溢出攻击。只有在代码中没有函数调用的情况下,程序才会不受影响(由于通常编写main(),而这是一个由启动代码调用的函数,它将对程序产生影响)。但是,堆栈溢出攻击并不是唯一可以使用的攻击,因此它不是万能的。但它是一种有用的保护措施,成本有限。
常见的栈溢出情况如下:
#include <string.h>
#include <stdio.h>int main(void)
{char array[10] = {0};strcpy(array, "stackoverflow");return 0;
}
解决上面的问题是在调用rw_i93_sm_format函数的代码的android.mk文件的LOCAL_CFLAGS编译器标记加上-fno-stack-protector这个编译选项,把“stack smashing detected”机制关闭即可。
signal 6 (SIGABRT), code -6 (SI_TKILL) Abort message: ‘stack corruption detected (-fstack-protector相关推荐
- android signal 6,Android x86 交叉编译后,运行出现signal 6 (SIGABRT), code -6 (SI_TKILL)
请问该如何处理?具体log如下 Build fingerprint: 'google/sdk_google_phone_x86/generic_x86:7.1.1/NYC/4316688:user/r ...
- Android JNI 报错(signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr )
目前看是线程调用问题引起的 , 错误Log如下: F DEBUG : uid: 1000 F DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault ...
- Android 报错A/libc: Fatal signal 6 (SIGABRT), code -6 in tid *** 解决
Android 报错A/libc: Fatal signal 6 (SIGABRT), code -6 in tid *** 解决 这几天经常出现apk报错:A/libc: Fatal signal ...
- Android 记录自己的错误(Fatal signal 6 (SIGABRT), code -6 in tid 16701 (RenderThread))
作为一个开发人员不出一些bug都难受,最近在研究在研究串口的开发,打开串口读取数据然后转换数据再关闭串口. 就是在这样来回操作几次以后就出现了一个没有错误信息也没有错误日志的错误,我自己的水平也不高没 ...
- android signal 6,android项目运行出现Fatal signal 6 (SIGABRT), code -6 in tid 3
07-26 19:45:51.019 31718-31866/com.example.administrator.haiweitwo E/art: 0xf487b000 SpaceTypeMalloc ...
- Android Fatal signal 6 (SIGABRT) at 0x0000271d (code=-6)
Android Fatal signal 6(SIGABRT) at 0x0000271d (code=-6) 本人第一次在网上写文章,有什么好的地方请大家担待,有问题欢迎提出,一起讨论.下面我遇到的 ...
- Android apk发生crash : Fatal signal 4 (SIGILL), code 1 (ILL_ILLOPC)
放了个假,上班第一天上午不知道修改了啥,导致apk运行直接crash. ============ --------- beginning of crash 10-10 13:31:19.870 64 ...
- Fatal signal 11 (SIGSEGV), code 1, fault addr 0x10457e30d996b in tid 5676 (ndroid.settings)
FROM:http://blogold.chinaunix.net/u3/104564/showart_2091186.html 一.安装交叉编译器 1)交叉编译器使用CodeSourcery提供的 ...
- 【我的C/C++语言学习进阶之旅】NDK开发之解决错误:signal 5 (SIGTRAP), code 1 (TRAP_BRKPT), fault addr 0xXXX
一.错误描述 今天在使用C++实现一个OpenGL特效的时候,运行出错,如下所示: 错误描述为: signal 5 (SIGTRAP), code 1 (TRAP_BRKPT), fault addr ...
最新文章
- gensim中word2vec使用
- hdoj-2039-三角形
- 新手学linux之-----------memroy.c
- Live CD|ISO
- MYSQLmy-innodb-heavy-4G.cnf配置文件注解
- shell 脚本批量安装perl包
- ajax control toolkit vs2013,如何将Ajax Control Toolkit控件安装到Visual Studio 2005工具箱
- php 调用vs2013 dll文件,vs2015 肿么添加dll文件
- uml边界类例子_面向对象UML笔记
- php 替换alt,PHP 实现自动添加或者替换 内容的IMG标签的 alt title 属性
- python定义一维数组
- 用c51控制电机正反转以及加减速
- 计算机毕业设计JAVA瓷砖仓库管理mybatis+源码+调试部署+系统+数据库+lw
- mybatis插件破解
- “你打算怎么构建云安全资源池”
- 反意疑问句及其回答用法归纳+习题讲解
- 你想要的宏基因组-微生物组知识全在这(2020.10)
- 英雄联盟手游版(MOBA)游戏体验报告
- Axure设计原型如何如何插入视频
- 【面经】Linux零碎系列
热门文章
- 西门子PORTAL精简屏下载程序后很多参数无数据,显示####
- 多维数据驱动的粮食安全分析与智能决策系统研究与实践
- PPT文件找回打开密码
- Windows XP最后的安全补丁
- UE特效--Spline蓝图--制作数字城市道路分析
- 提取HTML中所有图片地址的正则表达式
- 川大2019计算机硕土论文盲审,四川大学关于对2017年下半年申请答辩研究生学位论文进行抽查盲审的通知...
- 万全系列服务器,联想7款万全服务器
- 公布HP TC4400 安装WIN7全驱动全功能攻略
- vue整合富文本编辑器tinymce