From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "magic" |
|---|
| subject | "Format:OCaml bytecode executable" |
|---|
| claim | "A bytecode executable ends with the 12-byte magic 'Caml1999X' + 3-digit version (039 at trunk, giving 'Caml1999X039'); other OCaml files use the same prefix with a different kind letter (I cmi, O cmo, A cma, Y/y cmx, Z/z cmxa, M/N AST, D cmxs, T cmt, L linear)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:OCaml bytecode executable" |
|---|
| observed_in | |
|---|
|
|---|
| data | | bytes | "43 61 6D 6C 31 39 39 39 58 30 33 39" |
|---|
| offset | -12 |
|---|
| relative_to | "end of file" |
|---|
| meaning | "Caml1999X039 exec magic at ocaml/ocaml trunk ada116a79dbb; version digits change with the compiler" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "MAGIC_NUMBER__PREFIX Caml1999, MAGIC_NUMBER__VERSION 039, EXEC__FORMAT X, kind letters per DEFINE_MAGIC_NUMBER." |
|---|
| repo | "ocaml/ocaml" |
|---|
| commit | "ada116a79dbb1ca81c888eb5a2eb6762ca2643cb" |
|---|
| path | "build-aux/ocaml_version.m4" |
|---|
| lines | "98-128" |
|---|
|
| type | "source" |
|---|
| detail | "caml_read_trailer seeks TRAILER_SIZE from the end and compares trail->magic with EXEC_MAGIC." |
|---|
| repo | "ocaml/ocaml" |
|---|
| commit | "ada116a79dbb1ca81c888eb5a2eb6762ca2643cb" |
|---|
| path | "runtime/startup_byt.c" |
|---|
| lines | "98-115" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Caml1999X trailer magic" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T07:53:50.541Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T08:24:03.587Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read build-aux/ocaml_version.m4 lines 98-128 (prefix Caml1999, version 039, EXEC kind X, other kind letters as listed) and runtime/startup_byt.c caml_read_trailer (lseek -TRAILER_SIZE from the end, strncmp(trail->magic, EXEC_MAGIC)) at the commit. The version digits belong to that trunk commit." |
|---|
|
|
|---|