¡¡Chinese Journal of Computers   Full Text
  TitleResearch on Dynamic Memory Faults Testing Method Based on Pointer Mapping Sets
  AuthorsZHANG Wei1),2) GONG Yun-Zhan2) LU Qing-Ling1) WAN Lin1)
  Address1)(Department of Information Engineering, Academy of Armored Force Engineering, Beijing 100072)
2)(State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing 100876)
  Year2009
  IssueNo.11(2274¡ª2281)
  Abstract &
  Background
Abstract Dynamic memory faults are ubiquitous in the program with pointers. It is difficult to locate faults sources adopting dynamic testing method. Static analysis methods nowadays often miss some faults and produce too many false alarms. Considering of these problems, this paper puts forward the notion of pointer mapping algebra system that reflects the mapping relationship of pointer and memory completely, and gives the construction rules of pointer mapping sets for different faults class, and then establishes dynamic memory faults model. Through pointer mapping sets and fault model, it can detect bad deallocation, memory leak and null pointer dereference faults automatically and increase the testing efficiency. In the process of analyzing, it adopts synthetically control flow chart and path condition in order to increase the precision of testing results. Results of experimentation show that this method can detect dynamic memory faults effectively. Since rule definition is general, the probability of missing faults and producing false alarms is lower.
Keywords software testing; static analysis; pointer mapping sets; memory leak; null pointer dereference Background
Software testing as one of the key technique of guaranteeing the quality of software, it can effectively detect faults. According to the statistics of Boehm, cost used in testing accounts for 30% to 50% of the total software development cost. For some key software related with life¡¯s safety, the testing cost even is three to five times of the total cost of all the other software engineering phases. Therefore, improving the effectiveness of software testing and testing efficiency, reducing the cost of software development has become one of the urgent tasks needs to be solved.
Statistical data shows that the dynamic memory faults is common in the program with pointers, it is difficult to locate accurately the source of faults by adopting dynamic testing methods. Static analysis methods nowadays sometimes miss some faults or give too many false alarms. So, studying faults testing method is a very important theoretical and practical significance.
The authors of this paper have been involved in GIS Company software faults testing work, namely, confirmed the check points (IP) found by static analysis tool of Reasoning Company. It involved software of many international well-known companies and its code amounted to more than 200 million lines. The authors found that the tool omitted some faults and had a higher rate of false alarm, so, analyzed deeply faults type and characteristics and put forward a new testing method. Comparing with testing results checked by static analysis tool of Reasoning Company, it could find more faults and has higher accuracy.
At present, the authors have developed Defect Testing System(DTS) based on static analysis, and it has been put into use. The work is supported by the National High Technology Research and Development Program(863 Program)of China under grant No.2007AA010302 and No.2009AA012404.