Patch and verify

glaurung verify-recovery

Compile-check recovered C or compare its output with a reference program.

does not write by default 2 worked examples

use it for

A compile pass checks syntax and types. Runtime comparison is stronger, but only for the arguments and input you supply.

Run glaurung verify-recovery --help on your installed version before putting the command in a script. Glaurung is still pre-1.0.

input
One recovered C or C++ source file, or a dash to read source from stdin.
output
Compiler status, optional execution output, byte similarity, and optional runtime comparison with a target.
mode
read only. The examples leave the input unchanged.

command shape

syntax

short form
$ glaurung verify-recovery SOURCE_FILE [--run] [--target PATH] [--compare-runtime]

The installed parser is authoritative: glaurung verify-recovery --help

run it

examples

Compile a tiny recovered program

A dash reads source from the pipe, so this smoke test leaves no source file behind.

run

from the engine checkout
$ printf 'int main(void) { return 0; }\n' | glaurung verify-recovery -

output

captured result captured on Ubuntu, 2026-08-31
compile: ✅ (/usr/bin/gcc)

captured on Ubuntu, 2026-08-31.

Read the result: A compile pass catches syntax and type errors only. It says nothing about behavioral equivalence.

Compile and run one case

The recovered program exits successfully only when it receives one argument after its program name.

run

from the engine checkout
$ printf 'int main(int argc, char **argv) { return argc == 2 ? 0 : 1; }\n' | glaurung verify-recovery - --run --arg sample

output

captured result captured on Ubuntu, 2026-08-31
compile: ✅ (/usr/bin/gcc)
run: exit=0 runtime=0.7ms stdout=0b stderr=0b

captured on Ubuntu, 2026-08-31.

Read the result: This adds one execution case to the compile check. It still does not compare the recovered behavior with the original binary across an input set.

used above

important options

--language c|cpp
Select the source language.
--run
Compile and execute the recovered source.
--target PATH --compare-runtime
Run recovered and target programs with the same inputs.
--arg VALUE
Append one runtime argument; repeat as needed.
--stdin TEXT
Feed the same standard input to the program.

These are the flags used by the examples. Run glaurung verify-recovery --help for the complete parser help.

keep working

related commands

← all 40 commands