mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-10-19 18:12:14 -09:00
GP-3417 fixed case where si vtable was not getting created bc too many refs. Added secondary check. Added check for same num special vtable and typeinfos.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user