Merge remote-tracking branch 'origin/GP-3417_RTTI_script_fix_unfound_special_si_vtable--SQUASHED' into Ghidra_10.3

This commit is contained in:
ghidra1
2023-05-08 22:47:59 -04:00

View File

@@ -204,6 +204,11 @@ public class RTTIGccClassRecoverer extends RTTIClassRecoverer {
Msg.debug(this, "Could not create special vtables");
return null;
}
if(specialVtables.size() != specialTypeinfos.size()) {
Msg.debug(this, "Not equal number of special vtables and special typeinfos");
return null;
}
setComponentOffset();
@@ -3382,6 +3387,13 @@ private Address getReferencedAddress(Address address) {
if (specialTypeinfoAddrSet.contains(refTo)) {
continue;
}
// all special vtables have zeros just before the ref to typeinfo
Address vtableAddress = refTo.subtract(defaultPointerSize);
if (!isPossibleNullPointer(vtableAddress)) {
continue;
}
possibleRefsInVtable.add(refTo);
}
if (possibleRefsInVtable.size() != 1) {