[PATCH] D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 8 05:57:54 PDT 2019


MaskRay updated this revision to Diff 208378.
MaskRay retitled this revision from "[ubsan] Delete the FloatDivideByZero ErrorType" to "[Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272".
MaskRay edited the summary of this revision.
MaskRay added a comment.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Fix -fsanitize=float-divide-by-zero


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64317/new/

https://reviews.llvm.org/D64317

Files:
  lib/Driver/ToolChain.cpp
  test/Driver/fsanitize.c


Index: test/Driver/fsanitize.c
===================================================================
--- test/Driver/fsanitize.c
+++ test/Driver/fsanitize.c
@@ -840,3 +840,6 @@
 // CHECK-POINTER-SUB-NEEDS-ADDRESS: error: invalid argument '-fsanitize=pointer-subtract' only allowed with '-fsanitize=address'
 // CHECK-NO-POINTER-SUB-NOT: {{.*}}asan-detect-invalid-pointer{{.*}}
 // CHECK-NO-POINTER-CMP-NOT: {{.*}}asan-detect-invalid-pointer{{.*}}
+
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=float-divide-by-zero %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FLOAT-DIV-BY-ZERO:
+// CHECK-FLOAT-DIV-BY-ZERO: "-fsanitize=float-divide-by-zero"
Index: lib/Driver/ToolChain.cpp
===================================================================
--- lib/Driver/ToolChain.cpp
+++ lib/Driver/ToolChain.cpp
@@ -896,6 +896,7 @@
                        ~SanitizerKind::Function) |
                       (SanitizerKind::CFI & ~SanitizerKind::CFIICall) |
                       SanitizerKind::CFICastStrict |
+                      SanitizerKind::FloatDivideByZero |
                       SanitizerKind::UnsignedIntegerOverflow |
                       SanitizerKind::ImplicitConversion |
                       SanitizerKind::Nullability | SanitizerKind::LocalBounds;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64317.208378.patch
Type: text/x-patch
Size: 1269 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190708/4e474ed5/attachment.bin>


More information about the cfe-commits mailing list