From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Library:Go runtime" |
|---|
| claim | "A Go itab (runtime.itab, internal/abi.ITab), the first word of a non-empty interface value, is: interface type pointer, concrete type pointer, the concrete type's hash, 4 bytes padding on 64-bit, then the method table (one code pointer per interface method, in the interface's sorted method order; Fun[0] == 0 means the type does not implement the interface). The layout is the same in Go 1.16 and the 2026 master." |
|---|
| scope | | level | "library" |
|---|
| applies_to | "Library:Go runtime" |
|---|
| observed_in | | "Build:Mailpit/1.22.3 (Windows x64, GitHub release mailpit-windows-amd64.zip)" |
|
|---|
|
|---|
| data | | name | "abi_ITab" |
|---|
| size_min | "0x20" |
|---|
| alignment | 8 |
|---|
| fields | | offset | "0x0" |
|---|
| size | 8 |
|---|
| type | "void *" |
|---|
| name | "Inter" |
|---|
| notes | "*abi.InterfaceType" |
|---|
|
| offset | "0x8" |
|---|
| size | 8 |
|---|
| type | "void *" |
|---|
| name | "Type" |
|---|
| notes | "*abi.Type of the concrete type" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "Hash" |
|---|
| notes | "copy of Type.Hash, used by type switches" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "pad" |
|---|
|
| offset | "0x18" |
|---|
| size | 8 |
|---|
| type | "void *" |
|---|
| name | "Fun" |
|---|
| notes | "variable-length method table" |
|---|
|
|
|---|
| endianness | "native" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "type ITab struct { Inter *InterfaceType; Type *Type; Hash uint32; Fun [1]uintptr }" |
|---|
| repo | "https://github.com/golang/go" |
|---|
| commit | "dfc6f7db9bd75868ffb5cbc9501a2f4899122d2f" |
|---|
| path | "src/internal/abi/iface.go" |
|---|
| lines | "17-22" |
|---|
|
| type | "source" |
|---|
| detail | "Go 1.16 runtime.itab: inter, _type, hash uint32, _ [4]byte, fun [1]uintptr" |
|---|
| repo | "https://github.com/golang/go" |
|---|
| commit | "f21be2fdc6f1becdbed1592ea0b245cdeedc5ac8" |
|---|
| path | "src/runtime/runtime2.go" |
|---|
| lines | "857-863" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "Reading Inter at +0 and Type at +8 of the itabs listed by moduledata.itablinks names pairs such as *os.fileStat implements fs.FileInfo in Mailpit v1.22.3." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "itab (64-bit)" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T09:13:42.862Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T07:37:18.678Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read internal/abi/iface.go 12-30 at the cited commit: ITab {Inter *InterfaceType; Type *Type; Hash uint32; Fun [1]uintptr}, 'fun[0]==0 means Type does not implement Inter'; with natural alignment on 64-bit Hash is at 0x10, 4 bytes padding, Fun at 0x18, base size 0x20; Size() adds (len(Methods)-1)*PtrSize." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:40:32.498Z" |
|---|
| summary | "Set byte order native: Go runtime in-memory structure." |
|---|
| changed | |
|---|
|
|
|---|