arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2102.12782cs.SE
收藏

NSan:一种浮点数字消毒器

NSan: A Floating-Point Numerical Sanitizer

Clement Courbet

摘要:

杀毒程序是软件工程中相对较新的趋势。它们的目标是自动发现程序中的bug,现在它们通常作为编译器工具链的一部分提供给程序员。例如,LLVM项目包括开箱即用的杀毒程序来检测线程安全(tsan),内存(asan,msan,lsan)或未定义行为(ubsan)错误。在本文中,我们介绍了nsan,一种用于定位和调试浮点数值问题的新消毒器,在LLVM消毒器框架内实现。nsan强调实用性。它旨在及时提供准确和可操作的反馈。nsan使用编译时插装(instrumentation)来用更高精度的影子(shadow)来增加程序中的每个浮点计算,在程序执行期间检查该影子的一致性。这使得nsan比现有的方法快1到4个数量级,这使得nsan可以作为单元测试的一部分定期运行,或者检测大型生产应用程序中的问题。

英文摘要:

Sanitizers are a relatively recent trend in software engineering. They aim at automatically finding bugs in programs, and they are now commonly available to programmers as part of compiler toolchains. For example, the LLVM project includes out-of-the-box sanitizers to detect thread safety (tsan), memory (asan,msan,lsan), or undefined behaviour (ubsan) bugs. In this article, we present nsan, a new sanitizer for locating and debugging floating-point numerical issues, implemented inside the LLVM sanitizer framework. nsan puts emphasis on practicality. It aims at providing precise, and actionable feedback, in a timely manner. nsan uses compile-time instrumentation to augment each floating-point computation in the program with a higher-precision shadow which is checked for consistency during program execution. This makes nsan between 1 and 4 orders of magnitude faster than existing approaches, which allows running it routinely as part of unit tests, or detecting issues in large production applications.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑