Code: Select all
// If the whole object vptr doesn't refer to the whole object type, we're
// in the middle of constructing a primary base, and src is a separate
// base. This has undefined behavior and we can't find anything outside
// of the base we're actually constructing, so fail now rather than
// segfault later trying to use a vbase offset that doesn't exist.
const void *whole_vtable = *static_cast (whole_ptr);
const vtable_prefix *whole_prefix =
(adjust_pointer
(whole_vtable, -ptrdiff_t (offsetof (vtable_prefix, origin))));
if (whole_prefix->whole_type != whole_type)
return NULL;
https://patchwork.ozlabs.org/project/gc ... edhat.com/
Was für ein Kommentar. Das gleiche. Whole_type ?
Ich habe mein Bestes versucht, verschiedene Szenarien auszuprobieren, aber ohne Erfolg. Kann jemand ein geeignetes Beispiel geben?