From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Platform:Microsoft Visual C++ ABI" |
|---|
| claim | "An MSVC CatchableType (_CT??_R0<type>@8<copy ctor><size>) is 28 bytes: properties (1 scalar type, 4 has virtual bases, 8 WinRT, 0x10 std::bad_alloc), TypeDescriptor, the PMD this-displacement mdisp/pdisp/vdisp, the object size, and the copy constructor (0 for scalars). The CatchableTypeArray (_CTA<n><type>) before it is an int32 count followed by that many references, thrown type first, then its public bases." |
|---|
| scope | | level | "platform" |
|---|
| applies_to | "Platform:Microsoft Visual C++ ABI" |
|---|
| observed_in | | "MSVC 19.44 x86 and x64 test builds" |
|
|---|
|
|---|
| data | | name | "CatchableType" |
|---|
| size | 28 |
|---|
| alignment | 4 |
|---|
| fields | | offset | "0x00" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "properties" |
|---|
| notes | "1 simple type, 4 virtual bases, 8 WinRT, 0x10 std::bad_alloc" |
|---|
|
| offset | "0x04" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "pType" |
|---|
| notes | "TypeDescriptor; RVA on x64, VA on x86" |
|---|
|
| offset | "0x08" |
|---|
| size | 4 |
|---|
| type | "int32_t" |
|---|
| name | "mdisp" |
|---|
|
| offset | "0x0C" |
|---|
| size | 4 |
|---|
| type | "int32_t" |
|---|
| name | "pdisp" |
|---|
| notes | "-1 if not through a virtual base" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "int32_t" |
|---|
| name | "vdisp" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "int32_t" |
|---|
| name | "sizeOrOffset" |
|---|
| notes | "size of the type" |
|---|
|
| offset | "0x18" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "copyFunction" |
|---|
| notes | "copy constructor or 0; RVA on x64, VA on x86" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "eh.CatchableType {Flags, TD, NonVirtualAdjustment, OffsetToVBPtr, VBTableIndex, Size, CopyCtor}; IsScalar 1, HasVirtualBases 4, IsStdBadAlloc 16; CatchableTypeArray {NumEntries, [N x ref]}" |
|---|
| repo | "https://github.com/llvm/llvm-project" |
|---|
| commit | "8cdfc2de74ce046bae08f3a423be85694f225f3b" |
|---|
| path | "clang/lib/CodeGen/MicrosoftCXXABI.cpp" |
|---|
| lines | "737-770, 4244-4316" |
|---|
|
| type | "source" |
|---|
| detail | "cxx_type_info {flags, type_info, this_ptr_offsets, size, copy_ctor}; CLASS_IS_SIMPLE_TYPE 1, CLASS_HAS_VIRTUAL_BASE_CLASS 4, CLASS_IS_WINRT 8" |
|---|
| repo | "https://github.com/wine-mirror/wine" |
|---|
| commit | "7298a818b79446bae153b8d5aa27235ab3703bf9" |
|---|
| path | "dlls/msvcrt/cxx.h" |
|---|
| lines | "24-26, 335-348, 358-373" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "x64: _TI1H -> _CTA1H {1, _CT??_R0H@84} with properties 1, size 4, copy 0; std::bad_alloc's CatchableType properties 0x10; _CTA3?AUMyError@zoo@@ lists MyError (32), runtime_error (24), exception (24)." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "CatchableType" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T06:28:48.376Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T06:25:40.530Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read clang/lib/CodeGen/MicrosoftCXXABI.cpp at 8cdfc2de74ce: eh.CatchableType FieldTypes {int Flags, ref TypeDescriptor, int NonVirtualAdjustment, int OffsetToVBPtr, int VBTableIndex, int Size, ref CopyCtor} = 28 bytes with 4-byte image-relative refs; flags 1 scalar, 4 virtual bases, 16 std::bad_alloc (comment: bits 2 and 8 never set by clang); CatchableTypeArray {int NumEntries, [N x ref]}. Matches." |
|---|
|
|
|---|