benilla-re systems structs docs

getF

function · lua · unreached

Address
0x6f5610 · 56 bytes, up to 0x6f5647
Meaning
Reads up to 512 bytes of a file for the loader
Confidence
verified, proof one
Finding
lua/auxlib#loading-chunks

Finding: Loading chunks in lua: the auxiliary library

luaL_loadfile opens a file (or standard input for a null name), reopens it in binary mode when its first byte is neither a space nor printable, and reads it through lua_load with the reader getF, 512 bytes at a time; errfile makes the cannot read message. getS is the string reader of luaL_loadbuffer. lua_dofile, lua_dobuffer and lua_dostring load and run a chunk, aux_do calling it in protected mode and callalert the global _ALERT, or printing the message, on failure.

functionnamedecided by
0x6f5490luaL_loadfilefopen (0x6f5506), getc and ungetc (0x6f54ca, 0x6f54d3), the rb reopen (0x6f557f), lua_load (0x6f55bb), the names =stdin and @%s
0x6f5610getFend-of-file flag test (0x6f5615), fread of 0x200 (0x6f562e)
0x6f5650errfilelua_tostring, strerror (0x6f5667), the format cannot read %s: %s (0x6f566e), lua_remove (0x6f5680)
0x6f56e0getSsize zero returns null (0x6f56e6, 0x6f56eb); else the size is stored (0x6f56f1) and cleared (0x6f56f5)
0x6f5700lua_dofileluaL_loadfile (0x6f5703), tail jmp to aux_do (0x6f570d)
0x6f5720aux_dolua_pcall (0x6f572d), callalert (0x6f5738)
0x6f5750callalertthe name _ALERT (0x6f5757), lua_gettable, type 6 (0x6f5777), lua_call (0x6f5791), fprintf (0x6f57a8)
0x6f57c0lua_dobufferluaL_loadbuffer (0x6f57d0), aux_do (0x6f57d9)
0x6f57f0lua_dostringlength by repne scasb, lua_dobuffer (0x6f5804)

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.