Commit Graph

2 Commits

Author SHA1 Message Date
bherbruck 7893507575 shim(topology.database_io): bound word extraction with setw
word_cap is measured from the file before the shim opens it (0 if that
fails), so the unbounded >> into a word_cap+2 buffer could overflow if the
file changed in between. Results are unchanged for words within word_cap
(difftest 2059/2059 pass).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 15:39:04 -04:00
bherbruck 01980599e3 topology.database_io: port SmDatabaseIO read side with difftest
DatabaseReader (binary reads, byte swapping, ReadType, GoToNextLine) and
InputStream (libstdc++ istream extraction semantics for ASCII readers).
Difftest: 2059 cases (upstream test files, edge cases, generated scripts),
green; 200k-seed run also green. Findings recorded.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 15:37:40 -04:00