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;
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;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits