[llvm] r330958 - [docs] provide the specific sanitizer option to detect junk-in-the-ftrunc

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 26 10:04:07 PDT 2018


Author: spatel
Date: Thu Apr 26 10:04:07 2018
New Revision: 330958

URL: http://llvm.org/viewvc/llvm-project?rev=330958&view=rev
Log:
[docs] provide the specific sanitizer option to detect junk-in-the-ftrunc

Modified:
    llvm/trunk/docs/ReleaseNotes.rst

Modified: llvm/trunk/docs/ReleaseNotes.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.rst?rev=330958&r1=330957&r2=330958&view=diff
==============================================================================
--- llvm/trunk/docs/ReleaseNotes.rst (original)
+++ llvm/trunk/docs/ReleaseNotes.rst Thu Apr 26 10:04:07 2018
@@ -63,7 +63,8 @@ Non-comprehensive list of changes in thi
 
 * Optimization of floating-point casts is improved. This may cause surprising
   results for code that is relying on undefined behavior. Code sanitizers can
-  be used to detect affected patterns such as this:
+  be used to detect affected patterns. The option for detecting this problem 
+  alone is "-fsanitize=float-cast-overflow":
 
 .. code-block:: c
 
@@ -76,7 +77,7 @@ Non-comprehensive list of changes in thi
 
 .. code-block:: bash
 
-    clang -O1 ftrunc.c -fsanitize=undefined ; ./a.out 
+    clang -O1 ftrunc.c -fsanitize=float-cast-overflow ; ./a.out 
     ftrunc.c:5:15: runtime error: 4.29497e+09 is outside the range of representable values of type 'int'
     junk in the ftrunc: 0.000000
 




More information about the llvm-commits mailing list