From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Hermes bytecode (HBC)" |
|---|
| claim | "A string table entry is one u32 of bitfields allocated in declaration order: IsUTF16 (1 bit), Offset (23 bits), Length (8 bits). If the offset (>= 1<<23) or length (>= 255) does not fit, the entry is overflowed: Length is set to 255 (INVALID_LENGTH, the only marker) and Offset holds the position of an OverflowStringTableEntry {u32 offset, u32 length}, stored after the small table." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Hermes bytecode (HBC)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "SmallStringTableEntry" |
|---|
| size | 4 |
|---|
| alignment | 4 |
|---|
| endianness | "little" |
|---|
| fields | | name | "IsUTF16" |
|---|
| type | "bit" |
|---|
| offset | 0 |
|---|
| notes | "1 bit, first bitfield" |
|---|
|
| name | "Offset" |
|---|
| type | "bits" |
|---|
| offset | 0 |
|---|
| notes | "23 bits after IsUTF16; offset into string storage, or overflow table position when Length == 255" |
|---|
|
| name | "Length" |
|---|
| type | "bits" |
|---|
| offset | 0 |
|---|
| notes | "8 bits after Offset; 255 = overflowed" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "SmallStringTableEntry bitfields and the OverflowStringTableEntry struct." |
|---|
| repo | "https://github.com/facebook/hermes" |
|---|
| commit | "17b37301da5da4a2cd55d78f9697c46c0fd96123" |
|---|
| path | "include/hermes/BCGen/HBC/BytecodeFileFormat.h" |
|---|
| lines | "177-217" |
|---|
|
| type | "source" |
|---|
| detail | "Read isOverflowed() { return getLength() == INVALID_LENGTH; } and the constructor that sets Length = INVALID_LENGTH and Offset = overflowOffset; INVALID_OFFSET is only used in the fit test. Bit order within the u32 comes from the HERMES_*_BITFIELD macros defined outside this file (not read)." |
|---|
| repo | "https://github.com/facebook/hermes" |
|---|
| commit | "17b37301da5da4a2cd55d78f9697c46c0fd96123" |
|---|
| path | "include/hermes/BCGen/HBC/BytecodeFileFormat.h" |
|---|
| lines | "177-217" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "SmallStringTableEntry layout" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T23:29:27.001Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T17:24:24.080Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read BytecodeFileFormat.h and BitField.h at the cited commit: HERMES_FIRST_BITFIELD(IsUTF16,1) uses BitField<...,0,bits> so IsUTF16 is bit 0, NEXT fields Offset 23 bits, Length 8 bits; isOverflowed() == (Length == 255); constructor stores overflowOffset in Offset; static_assert size 4; OverflowStringTableEntry {offset,length}." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T07:34:52.462Z" |
|---|
| summary | "Overflow marker is only Length == 255 (INVALID_LENGTH); the Offset field then holds an index/offset into the overflow table. INVALID_OFFSET (1<<23) is a limit constant, not a stored marker. Also…" |
|---|
| changed | | "claim" |
| "data" |
| "evidence" |
|
|---|
|
|
|---|