Skip to content

Commit 827dcbd

Browse files
committed
Add note about SO_Vptr ambiguity
1 parent 05d047b commit 827dcbd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/CodeGen/CGExpr.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,9 @@ void CodeGenFunction::EmitTypeCheck(TypeCheckKind TCK, SourceLocation Loc,
749749
return;
750750

751751
auto CheckHandler = SanitizerHandler::TypeMismatch;
752+
// SO_Vptr's corresponding handler is DynamicTypeCacheMiss, not TypeMismatch.
753+
// However, it relies upon IsGuaranteedNonNull, hence the instructions cannot
754+
// be fully separated from the TypeMismatch.
752755
SanitizerScope SanScope(this,
753756
{SanitizerKind::SO_Null, SanitizerKind::SO_ObjectSize,
754757
SanitizerKind::SO_Alignment, SanitizerKind::SO_Vptr},

0 commit comments

Comments
 (0)