嵌入式软件堆栈溢出的动态检测方案设计  被引量:1

Scheme of Embedded Software Stack Overflow Dynamically Detection

在线阅读下载全文

作  者:马建辉 王知学[1,2,3] 侯冬冬 胡代荣[1,2,3] 孙常青 

机构地区:[1]齐鲁工业大学(山东省科学院),济南250353 [2]山东省科学院自动化研究所 [3]山东省汽车电子技术重点实验室

出  处:《单片机与嵌入式系统应用》2018年第2期12-13,17,共3页Microcontrollers & Embedded Systems

基  金:山东省重点研发计划"移动互联新能源汽车车内信息安全技术研究与应用"(项目编号:2017GGX10145);山东省重点研发计划(重大关键技术;2016ZDJS03A04);山东省重点研发计划(2016GGC01023)

摘  要:设计了一种动态检测嵌入式软件堆栈溢出及使用量的方案,在不受堆栈溢出影响的定时器中断服务程序中,周期检测堆栈使用量,通过LED提示堆栈溢出深度。通过设置堆栈溢出缓冲区,在RAM空间中隔离堆栈和全局变量分区,使得浅度堆栈溢出不影响系统正常运行,同时,堆栈溢出缓冲区保存了关键的上下文信息,将该信息存储在非易失性存储器中,运行一段时间后,通过专用工具读取非易失性存储器中的堆栈使用量数据和溢出上下文信息,分析异常位置,从而调整堆栈尺寸或者调整程序设计,以提高系统运行的稳定性。In the paper,a solution to dynamically detect the overflow and usage of embedded software stacks is designed.The stack usage is detected periodically in the timer interrupt service routine which is not affected by stack overflow,and the stack overflow depth is prompted through LED.The stack overflow buffer partition is set in RAM space,and the stack partition and the global variable partition is isolated,so that the shallow stack overflow does not affect the normal operation of the system.at the same time,the stack overflow buffer holds the key context information,stores the information in non-volatile flash.After a period of operation,the dedicated tool is used to read the stack usage data and overflow context information in the non-volatile memory,the abnormal location is analyzed.So the stack size or the program design is adjusted to improve the stability of system operation.

关 键 词:嵌入式系统 RAM 堆栈 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象