LoadString
function · lua · boundary
- Address
0x6fee40· 57 bytes, up to0x6fee78- Meaning
- Reads a string of a precompiled chunk, null when its size is 0
- Confidence
- verified, proof one
- Finding
- lua/chunks#reading-the-stream
Finding: Reading the stream in lua: precompiled chunks
The reader takes bytes through the stream of the input module (runtime, Input streams) and raises
unexpected end of file in %s when it ends. A block is read as it is, or byte by byte from its last
byte when the swap flag is set; a vector swaps each element. An integer must not be negative (bad integer in %s). A string is a size, 0 for none, then that many bytes ending in a zero, which the
string drops.
| function | name | decided by |
|---|---|---|
0x6fed20 | ezgetc | next byte or luaZ_fill (0x6fed26..0x6fed44), end gives unexpectedEOZ (0x6fed4b..0x6fed52) |
0x6fed60 | unexpectedEOZ | the message (0x6fed66), luaG_runerror (0x6fed6c) |
0x6fee10 | ezread | luaZ_read (0x6fee1d), bytes left give unexpectedEOZ (0x6fee24, 0x6fee28) |
0x6fedc0 | LoadBlock | swap flag (0x6fedc7), bytes stored from the last (0x6fede0..0x6fedeb), else ezread (0x6fedf7) |
0x6feee0 | LoadVector | swap flag (0x6feee4), each element reversed (0x6fef10..0x6fef33), else ezread of the product (0x6fef3e..0x6fef46) |
0x6fed80 | LoadInt | LoadBlock 4 (0x6fed8c), negative (0x6fed94), bad integer in %s (0x6fed9e) |
0x6fee80 | LoadSize | LoadBlock 4 (0x6fee89) |
0x6ff1f0 | LoadNumber | LoadBlock 8 (0x6ff1fb), fld (0x6ff200) |
0x6fee40 | LoadString | LoadSize (0x6fee44), 0 gives null (0x6fee4b), luaZ_openspace (0x6fee59), ezread (0x6fee65), luaS_newlstr of size less 1 (0x6fee6c, 0x6fee70) |
The derivation is in the doc.
Callers 4
- LoadFunction lua
- LoadLocals lua
- LoadUpvalues lua
- LoadConstants lua
Callees 4
- luaS_newlstr lua
- luaZ_openspace lua
- ezread lua
- LoadSize lua
Calls and jumps by a bare address, from tables/calls.tsv.