[PATCH] D12790: ubsan: Implement memory permission validation for vtables.
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 18:28:27 PDT 2015
kcc added inline comments.
================
Comment at: lib/ubsan/ubsan_type_hash_itanium.cc:199
@@ +198,3 @@
+
+#if SANITIZER_LINUX
+ // Validate the memory permissions of the vtable pointer and the first
----------------
can this be if (SANITIZER_LINUX)?
================
Comment at: test/ubsan/TestCases/Linux/TypeCheck/vptr-bad-perms.cpp:2
@@ +1,3 @@
+// RUN: %clangxx -frtti -fsanitize=vptr -fno-sanitize-recover=vptr -g %s -O3 -o %t
+// RUN: not %run %t 2>&1 | FileCheck %s
+
----------------
add an explanation comment to the test
================
Comment at: test/ubsan/TestCases/Linux/lit.local.cfg:1
@@ +1,2 @@
+def getRoot(config):
+ if not config.parent:
----------------
I wonder if we can use something like
REQUIRES: linux
instead of putting this test into a separate dir.
We don't have this exact requirement now, but quite a few others.
http://reviews.llvm.org/D12790
More information about the llvm-commits
mailing list