NSan: A Floating-Point Numerical Sanitizer
Clement Courbet

TL;DR
NSan is a practical floating-point sanitizer integrated into LLVM that uses compile-time instrumentation with high-precision shadows to efficiently detect numerical issues, enabling routine use in testing and production.
Contribution
It introduces a fast, precise floating-point sanitizer within LLVM, significantly improving practicality over existing methods.
Findings
NSan is 1 to 4 orders of magnitude faster than existing approaches.
It provides precise, actionable feedback on floating-point issues.
NSan can be used routinely in unit tests and large applications.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
