[PATCH] D64317: [ubsan] Delete the FloatDivideByZero ErrorType

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 03:02:04 PDT 2019


MaskRay created this revision.
MaskRay added reviewers: kcc, rsmith, spatel, vitalybuka.
Herald added subscribers: llvm-commits, Sanitizers, delcypher, kubamracek.
Herald added projects: LLVM, Sanitizers.

The float-divide-by-zero sanitizer was deleted by D63793 <https://reviews.llvm.org/D63793>/rC365272 <https://reviews.llvm.org/rC365272>,
on the basis that it is defined by Clang / LLVM / IEEE 754.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D64317

Files:
  lib/ubsan/ubsan_checks.inc
  lib/ubsan/ubsan_handlers.cc


Index: lib/ubsan/ubsan_handlers.cc
===================================================================
--- lib/ubsan/ubsan_handlers.cc
+++ lib/ubsan/ubsan_handlers.cc
@@ -249,10 +249,8 @@
   ErrorType ET;
   if (RHSVal.isMinusOne())
     ET = ErrorType::SignedIntegerOverflow;
-  else if (Data->Type.isIntegerTy())
+  else
     ET = ErrorType::IntegerDivideByZero;
-  else
-    ET = ErrorType::FloatDivideByZero;
 
   if (ignoreReport(Loc, Opts, ET))
     return;
Index: lib/ubsan/ubsan_checks.inc
===================================================================
--- lib/ubsan/ubsan_checks.inc
+++ lib/ubsan/ubsan_checks.inc
@@ -28,7 +28,6 @@
             "unsigned-integer-overflow")
 UBSAN_CHECK(IntegerDivideByZero, "integer-divide-by-zero",
             "integer-divide-by-zero")
-UBSAN_CHECK(FloatDivideByZero, "float-divide-by-zero", "float-divide-by-zero")
 UBSAN_CHECK(InvalidBuiltin, "invalid-builtin-use", "invalid-builtin-use")
 UBSAN_CHECK(ImplicitUnsignedIntegerTruncation,
             "implicit-unsigned-integer-truncation",


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64317.208341.patch
Type: text/x-patch
Size: 1043 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190708/12700e82/attachment.bin>


More information about the llvm-commits mailing list