From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "signature" |
|---|
| subject | "Format:PYC (Python compiled bytecode)" |
|---|
| claim | "A marshalled CPython 3.11 or 3.12 module code object (offset 16 of a pyc, or headerless marshal data in packed applications) matches E3, argcount/posonly/kwonly = 0, any stacksize < 65536, flags with only the top byte possibly set, the bytecode as F3 + int32 length, and RESUME 0 (97 00) as its first instruction." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:PYC (Python compiled bytecode)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | pattern | "E3 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? 00 00 00 00 00 ?? F3 ?? ?? ?? ?? 97 00" |
|---|
| matches | "start of the module-level code object of CPython 3.11/3.12 marshal data" |
|---|
| offset | 0 |
|---|
|
|---|
| evidence | | type | "runtime_test" |
|---|
| detail | "Matches at offset 16 of 1022 of 1022 stdlib pycs of CPython 3.11.15 and 12750 of 12751 of 3.12.8 (the exception, a test module with a cell variable, begins with MAKE_CELL 0x87 before RESUME). The flags byte wildcard is needed for CO_FUTURE_ANNOTATIONS (0x1000000), set in 323 of the 3.11 files. No match in python311.dll / python312.dll, whose frozen modules are deep-frozen C structures, not marshal data." |
|---|
|
| type | "source" |
|---|
| detail | "v3.11.0: def_op('RESUME', 151)" |
|---|
| repo | "https://github.com/python/cpython" |
|---|
| commit | "deaf509e8fc6e0363bd6f26d52ad42f976ec42f2" |
|---|
| path | "Lib/opcode.py" |
|---|
| lines | "178" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Module code object, CPython 3.11-3.12" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T05:12:29.636Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T11:18:09.991Z" |
|---|
| result | "partial" |
|---|
| method | "Read Lib/opcode.py at deaf509e line 178 (RESUME = 151 = 0x97) and 155 (MAKE_CELL = 135 = 0x87), which gives the '97 00' tail and the MAKE_CELL exception; the marshal layout (E3 = TYPE_CODE|FLAG_REF, five int32, F3 = TYPE_STRING|FLAG_REF) and the pyc counts are not in the cited source and were not re-checked." |
|---|
|
|
|---|