Skip to content

Commit fb0859f

Browse files
author
RemoteNet
committed
[MsvcDiver] Fix more VFTable pollution
1 parent 048c0a7 commit fb0859f

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/ScubaDiver/MsvcPrimitives/MsvcTypesManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public VftableInfo(MsvcType msvcType, UndecoratedExportedField symbol)
4848
{
4949
_type = msvcType;
5050
ExportedField = symbol;
51-
_xoredAddress = symbol.Address;
51+
_xoredAddress = symbol.XoredAddress;
5252
_name = symbol.UndecoratedName;
5353
}
5454

@@ -62,6 +62,7 @@ public VftableInfo(MsvcType msvcType, nuint xoredVftableAddress, string name = n
6262
}
6363

6464
public override string Name => _name;
65+
public nuint XoredAddress => _xoredAddress;
6566
public ulong Address => _xoredAddress ^ FirstClassTypeInfo.XorMask;
6667
public override Type DeclaringType => _type;
6768
public override object GetValue(object obj) => Address;

src/ScubaDiver/MsvcPrimitives/TypeDumpFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private static void DeconstructRttiType(MsvcType type,
6565
{
6666
DecoratedName = vftable.Name,
6767
UndecoratedFullName = vftable.Name,
68-
XoredAddress = (long)(vftable.Address),
68+
XoredAddress = (long)vftable.XoredAddress,
6969
});
7070
}
7171
continue;

0 commit comments

Comments
 (0)