aboutsummaryrefslogtreecommitdiff
path: root/lib/ubsan/ubsan_type_hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ubsan/ubsan_type_hash.h')
-rw-r--r--lib/ubsan/ubsan_type_hash.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ubsan/ubsan_type_hash.h b/lib/ubsan/ubsan_type_hash.h
index 695fed905a73..aa638713f089 100644
--- a/lib/ubsan/ubsan_type_hash.h
+++ b/lib/ubsan/ubsan_type_hash.h
@@ -53,6 +53,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