摘要
为了实现极致的性能,C语言将操纵内存的权限以指针的方式暴露给开发人员。但是C语言编译器GCC和Clang都不提供内存安全检测,导致开发人员使用C语言编写的项目可能含有潜在的内存安全性漏洞。可以先使用检测工具定位错误,然后执行GDB来验证。文章介绍了GDB调试C程序时所采用的方法和技巧,并使用GDB验证了内存检测工具AddressSanitizer和Movec在大规模测试集SPEC上检测的有效性。
In order to achieve the ultimate performance,C language exposes the authority to manipulate memory to developers in the form of pointers.However,neither the C language compilers GCC nor Clang provides memory safety detection,which leads to potential memory safety vulnerabilities in projects written in C language by developers.You can use the detection tool to locate the error first,and then execute GDB to verify.This paper introduces methods and techniques being used when GDB debug C program,and uses GDB to verify the effectiveness of the memory detection tools AddressSanitizer and Movec on the large-scale test set SPEC.
作者
仵俊
WU Jun(College of Computer Science and Technology,Nanjing University of Aeronautics and Astronautics,Nanjing 211106,China)
出处
《现代信息科技》
2021年第21期152-154,共3页
Modern Information Technology
基金
国家自然科学基金:内存安全性和形式化规约的运行时验证(62172217)。