Patch and verify
glaurung verify-recovery
Compile-check recovered C or compare its output with a reference program.
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
$ 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
$ printf 'int main(void) { return 0; }\n' | glaurung verify-recovery - output
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
$ printf 'int main(int argc, char **argv) { return argc == 2 ? 0 : 1; }\n' | glaurung verify-recovery - --run --arg sample output
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
These are the flags used by the examples. Run glaurung verify-recovery --help for the complete parser help.
keep working