[PATCH] D11858: CFI: Add diagnostic handler and tests for indirect call checker.
Alexey Samsonov via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 13:31:23 PDT 2015
samsonov added inline comments.
================
Comment at: lib/ubsan/ubsan_handlers.cc:425
@@ -424,1 +424,3 @@
+static void HandleCFIBadIcall(CFIBadIcallData *Data, ValueHandle Function,
+ ReportOptions Opts) {
----------------
`handleCFIBadIcall` (for consistency)
================
Comment at: lib/ubsan/ubsan_handlers.cc:428
@@ +427,3 @@
+ SourceLocation Loc = Data->Loc.acquire();
+ ScopedReport R(Opts, Loc);
+
----------------
Don't you need to call `ignoreReport` here to deduplicate reports?
================
Comment at: test/cfi/bad-signature.c:21
@@ +20,3 @@
+ // CFI-DIAG: runtime error: control flow integrity check for type 'void (int)' failed during indirect function call
+ ((void (*)(int))f)(42); // UB here
+
----------------
You don't check for "f() defined here:" diagnostic note.
http://reviews.llvm.org/D11858
More information about the llvm-commits
mailing list