This scheme checks that pointer and lvalue casts are made to an object of
the correct dynamic type; that is, the dynamic type of the object must be
a derived class of the pointee type of the cast. The checks are currently
only introduced where the class being casted to is a polymorphic class.
Details
Details
Diff Detail
Diff Detail
Event Timeline
| docs/UsersManual.rst | ||
|---|---|---|
| 974 | Add -fsanitize=cfi-cast-strict? | |
| lib/CodeGen/CGClass.cpp | ||
| 2121 | Why? | |
| test/CodeGenCXX/cfi-cast.cpp | ||
| 5 | Could you have a quick blurb that helps decipher the metadata !"1B' part, explaining that it's the important bit in the checks. | |
| 16 | CHECK-LABEL-DCAST (same below). | |
| 78 | Add rvalue ref test? A a();
B rvalue() {
return static_cast<B&&>(a());
} | |
Comment Actions
Please also add compiler-rt test(s)
| docs/UsersManual.rst | ||
|---|---|---|
| 971 | Don't we want more verbose names? | |
Don't we want more verbose names?
cfi-polymorphic-base-downcast
cfi-void-to-polymorphic-cast
or something.