一句话:提出编译器驱动的差分测试,用于发现因未定义行为导致运行时语义不一致的不稳定代码。
本文关注由未定义行为(UB)导致的“不稳定代码”:同一程序可能因 UB 而在不同编译结果下呈现不一致的运行时语义。编译器通常假设 UB 不会发生,从而生成高效但可能语义不一致的二进制;现有 sanitizer 等动态工具主要覆盖常见 UB,难以发现当前技术触及不到的 UB。作者提出编译器驱动的差分测试来检测此类不稳定代码,旨在利用编译器对 UB 的假设与优化行为差异,暴露潜在的不稳定语义。摘要未报告具体实验数据与定量结果,但该工作将差分测试与编译器对 UB 的利用机制结合,为发现传统动态工具遗漏的 UB 提供了新途径。
Unstable code refers to code that has inconsistent or unstable run-time semantics due to undefined behavior (UB) in the program. Compilers exploit UB by assuming that UB never occurs, which allows them to generate efficient but potentially semantically inconsistent binaries. Practitioners have put great research and engineering effort into designing dynamic tools such as sanitizers for frequently occurring UBs. However, it remains a big challenge how to detect UBs that are beyond the reach of current techniques.