摘要
航天器软件进程堆栈溢出往往会导致软件"跑飞"的后果。文章分析了现有堆栈使用深度检测的静态测试方法和动态测试方法的优点和不足,针对航天器数管软件的特点,提出了一种适用于航天器数管软件进程堆栈使用深度的动态检测方法。通过访问应用软件与系统软件的接口,获得进程堆栈的起始地址和大小等信息,将堆栈区初始化为特定标识,对软件执行最大路径测试后,扫描堆栈区特定标识被覆盖情况,获得进程堆栈的使用深度。在嫦娥五号上升器数管软件中,实现了此方法,并通过上注在轨维护指令进行了测试。结果表明:在不借助任何专业检测软件的情况下,该方法能够实时检测出软件进程堆栈的最大使用深度,以利于避免进程堆栈溢出的风险,提高软件的可靠性。
Spacecraft software process stack overflow often causes the procedure to lose control.The paper analyzes the advantages and disadvantages of stack used depth detection of static test and dynamic test methods,and proposes a dynamic detection method according to the characteristics of spacecraft software.Through the interface of application software and system software,the start address and size of process stack can be obtained and the stack space will be initialized as specific identity after the software performs the maximum path test,and the stack space will be scanned to obtain the process stack used depth.In CE-5ascent stage onboard data handling software,the method is realized and tested by the way of onboard software maintenance.The results show that the method can detect the maximum used depth of the process stack in real time without any professional software,which is beneficial for avoiding the risk of process stack overflow,then improving the software reliability.
出处
《航天器工程》
CSCD
北大核心
2017年第1期85-90,共6页
Spacecraft Engineering
基金
国家重大科技专项工程
关键词
航天器软件
进程堆栈
使用深度
动态检测
spacecraft software
process stack
used depth
dynamic detection