Skip to content

Commit 0a6a3c1

Browse files
ahatanakojhunt
andauthored
[PAC][compiler-rt][UBSan] Strip signed vptr instead of authenticating it (llvm#100153)
vptr cannot be authenticated without knowing the class type if it was signed with type discrimination. Co-authored-by: Oliver Hunt <[email protected]>
1 parent 5e97bfb commit 0a6a3c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ struct VtablePrefix {
207207
std::type_info *TypeInfo;
208208
};
209209
VtablePrefix *getVtablePrefix(void *Vtable) {
210-
Vtable = ptrauth_auth_data(Vtable, ptrauth_key_cxx_vtable_pointer, 0);
210+
Vtable = ptrauth_strip(Vtable, ptrauth_key_cxx_vtable_pointer);
211211
VtablePrefix *Vptr = reinterpret_cast<VtablePrefix*>(Vtable);
212212
VtablePrefix *Prefix = Vptr - 1;
213213
if (!IsAccessibleMemoryRange((uptr)Prefix, sizeof(VtablePrefix)))

0 commit comments

Comments
 (0)