From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "identification" |
|---|
| subject | "Platform:Microsoft Visual C++ ABI" |
|---|
| claim | "In MSVC binaries with RTTI, the pointer-sized slot immediately before each vftable holds the address (VA, also on x64) of that vftable's CompleteObjectLocator. Searching for the VA of each locator therefore finds every RTTI-described vftable: the vftable starts one pointer after the hit." |
|---|
| scope | | level | "platform" |
|---|
| applies_to | "Platform:Microsoft Visual C++ ABI" |
|---|
| observed_in | | "MSVC 19.44 x86 and x64 test builds: 28 of 28 vftables at the vftable symbol addresses of the MAP file" |
| "Notepad++ x64: 397 vftables" |
| "Windows 11 msvcp140.dll x86 and x64: 93 vftables each" |
|
|---|
|
|---|
| data | | method | "Find '.?AV'/'.?AU' names, TypeDescriptor = name - 2 pointers; locator = a 4-aligned place where TypeDescriptor's RVA (x64) or VA (x86) sits at +0x0C, signature at +0 is 1 (x64) or 0 (x86), and on x64 +0x14 equals the locator's own RVA; vftable = (address of a pointer equal to image base + locator RVA) + pointer size." |
|---|
| indicator | "vftable[-1] == &CompleteObjectLocator" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "the vftable address point is at sizeof(void*) when RTTI data is emitted; the RTTI component (COL) is placed before the first virtual function" |
|---|
| repo | "https://github.com/llvm/llvm-project" |
|---|
| commit | "8cdfc2de74ce046bae08f3a423be85694f225f3b" |
|---|
| path | "clang/lib/CodeGen/MicrosoftCXXABI.cpp" |
|---|
| lines | "1756-1760, 1939-1960" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "Code:Microsoft Visual C++ ABI/msvc rtti scan (Python) implements this method; its vftable list matched the ??_7 symbols of the x86 and x64 MAP files exactly." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "vftable[-1] points to the CompleteObjectLocator" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T06:28:48.240Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T11:45:04.333Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read clang MicrosoftCXXABI.cpp at 8cdfc2d lines 1750-1762 (address point is sizeof(void*) when RTTIData is on, 0 otherwise), 1813 (RTTI = getMSCompleteObjectLocator) and 1939-1960 (the alias points one entry after the first). That is clang-cl's emission; the claim about MSVC-built binaries rests on the earlier binary scan, not re-checked. Note it holds only with RTTI data enabled (/GR)." |
|---|
|
|
|---|