Recent work in software security analysis shows that bugs cluster in hot spots code which containing an unusually high proportion of bugs.A method for hot spot oriented path searching is proposed,including searching shortest feasible path between branch statements and hot spot codes on control flow graph,and path feasibility judgment by using path constraints generated by symbolic executioa Strategies for multi-hot spot optimization are given to generate test cases which can cover the hot spot codes quickly.Compared with the DFS (depth-first search) and the BFS (best-first search BFS) method,test results show that this method can reduce test paths effectively and shorten search time on the same situation of hot spot code coverage.%程序测试研究表明代码安全缺陷聚集于热点代码.提出一种面向热点代码的路径搜索方法,在程序CFG (control flow graph)图上搜索分支语句与热点代码之间的最短路径,采用符号执行方法生成路径约束判断其可达性,结合多热点搜索优化策略进一步消除不可达子路径,从而快速生成能够覆盖热点代码的测试用例.实验结果表明,与DFS (depth-first search)和BFS (best-first search)方法相比,在达到相同热点代码覆盖率情形下,该方法能够有效减少测试路径并缩短搜索时间.
展开▼