summaryrefslogtreecommitdiff
path: root/libsanitizer/ubsan/ubsan_type_hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsanitizer/ubsan/ubsan_type_hash.h')
-rw-r--r--libsanitizer/ubsan/ubsan_type_hash.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libsanitizer/ubsan/ubsan_type_hash.h b/libsanitizer/ubsan/ubsan_type_hash.h
index 2da070edffa..610fcb44ea7 100644
--- a/libsanitizer/ubsan/ubsan_type_hash.h
+++ b/libsanitizer/ubsan/ubsan_type_hash.h
@@ -51,6 +51,10 @@ bool checkDynamicType(void *Object, void *Type, HashValue Hash);
const unsigned VptrTypeCacheSize = 128;
+/// A sanity check for Vtable. Offsets to top must be reasonably small
+/// numbers (by absolute value). It's a weak check for Vtable corruption.
+const int VptrMaxOffsetToTop = 1<<20;
+
/// \brief A cache of the results of checkDynamicType. \c checkDynamicType would
/// return \c true (modulo hash collisions) if
/// \code