From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "magic" |
|---|
| subject | "Format:Lua bytecode" |
|---|
| claim | "A precompiled Lua chunk starts with 1B 4C 75 61 ("\x1bLua", LUA_SIGNATURE), followed by the version byte major*16+minor (0x50 for 5.0 ... 0x55 for 5.5) and, from 5.1, the format byte 0x00 for the official format. LuaJIT uses 1B 4C 4A instead." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Lua bytecode" |
|---|
| observed_in | |
|---|
|
|---|
| data | | bytes | "1B 4C 75 61" |
|---|
| offset | 0 |
|---|
| meaning | "precompiled Lua chunk; byte 4 = version (0x51 5.1, 0x52 5.2, 0x53 5.3, 0x54 5.4, 0x55 5.5), byte 5 = format (0)" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "#define LUAC_VERSION (((LUA_VERSION_NUM / 100) * 16) + LUA_VERSION_NUM % 100), LUAC_FORMAT 0; LUA_SIGNATURE "\x1bLua" in lua.h line 33 (tag v5.4.8)" |
|---|
| repo | "https://github.com/lua/lua" |
|---|
| commit | "6e22fedb74cf0c9b6656e9fce8b7331db847c605" |
|---|
| path | "lundump.h" |
|---|
| lines | "24-26" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "Chunks written by MSVC x64 builds of every release 5.1 to 5.5.1 start with 1B 4C 75 61 5x 00; 36 chunks shipped with VLC 3.0.23 start with 1B 4C 75 61 51 00." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Signature and version byte" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T07:00:30.542Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T09:00:30.036Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read lundump.h (LUAC_VERSION formula, LUAC_FORMAT 0) and lua.h line 33 (LUA_SIGNATURE "\x1bLua") at the cited commit; the 5.5 value follows the formula, not read from a 5.5 source here." |
|---|
|
|
|---|