This revision was automatically updated to reflect the committed changes.
Closed by commit rL340849: [ubsan] Enable -fsanitize=vptr on Apple devices and
simulators (authored by vedantk, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D5
delcypher accepted this revision.
delcypher added a comment.
This revision is now accepted and ready to land.
LGTM.
Comment at: clang/test/Driver/fsanitize.c:426
+// RUN: %clang -target arm-apple-ios4 -fsanitize=vptr %s -### 2>&1 | FileCheck
%s --check-prefix=CHECK-VPTR-IOS-
vsk updated this revision to Diff 162732.
vsk added a comment.
Address some review feedback.
I'm not sure whether iOS 4 is really supported anymore. There are a handful of
code paths in the driver which handle that target, so I've added in a version
check for it.
https://reviews.llvm.org/D512
vsk added inline comments.
Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:2254
Res |= SanitizerKind::Function;
+ if (!isTargetMacOS() || !isMacosxVersionLT(10, 9))
+Res |= SanitizerKind::Vptr;
delcypher wrote:
> Could we apply De'Morgan's rule here an
delcypher requested changes to this revision.
delcypher added inline comments.
This revision now requires changes to proceed.
Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:2254
Res |= SanitizerKind::Function;
+ if (!isTargetMacOS() || !isMacosxVersionLT(10, 9))
+Res
vsk created this revision.
vsk added a reviewer: delcypher.
It seems like an oversight that this check was not always enabled for
on-device or device simulator targets.
https://reviews.llvm.org/D51239
Files:
clang/lib/Driver/ToolChains/Darwin.cpp
clang/test/Driver/fsanitize.c
Index: clang