mirror of
https://github.com/brazilofmux/tinymux
synced 2026-08-13 00:23:11 -04:00
On a box with any libmux.so on its library path, test-codiff reported
--- comparing 0 transcript lines ---
interp vs host : DIFFER (1914 lines)
dbt vs host : DIFFER (1914 lines)
FAIL: routes disagree -- see above.
Nothing disagreed. The host leg never ran -- it died with an undefined
reference to co_delete_at, and run.sh discarded its stderr -- so the reference
transcript was empty and every route "differed" from it by its whole length.
That is exactly the inversion the script's own comment says it exists to
avoid, and it named the wrong culprit while doing it.
The guard written for that hazard did not close it, for two reasons:
* The canary decays. It probed for co_insert_at, which the months-old
libmux in ~/lib still exports; the symbol that actually failed was
co_delete_at. Any hardcoded name stops discriminating as the library
grows past it -- silently, with no build error to notice.
* Choosing the right directory does not mean the right library LOADS.
-Wl,-rpath emits RUNPATH under the default --enable-new-dtags, and the
loader searches LD_LIBRARY_PATH BEFORE RUNPATH. So the guard selected
mux/lib correctly and the loader ignored it.
So stop asking what a candidate exports. Link against it, run it with the path
pinned, and keep the first that produces a transcript. "Does this work" cannot
decay, and it subsumes the canary question rather than restating it.
The host leg is now built and run during selection, so the duplicate build and
run further down are gone; the run that proved the choice is the transcript
that gets compared.
Note the run check is deliberately NOT a pipeline: `!` on `a | b` tests b, and
strip_marker is a grep that exits 1 when it selects nothing -- which would have
called a good host leg broken and an empty one fine.
Verified on Kagura, where LD_LIBRARY_PATH=/home/sdennis/lib is set from the
login profile -- the condition that caused this:
* unpinned `make test-codiff`: PASS, 1914 lines, interp OK, dbt OK.
* negative control -- the stale libmux copied over mux/lib/libmux.so:
both candidates are reported as not linking, naming co_delete_at, and
the run SKIPs (exit 0) instead of failing as a route disagreement.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| repro | ||
| .gitignore | ||
| cases.h | ||
| guest_main.c | ||
| host_main.c | ||
| min_main.c | ||
| run.sh | ||
| runner.cpp | ||