From a1c5862a46b524d3e11a87c5a732c0c257aefe20 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Thu, 26 Feb 2026 19:31:35 +0100 Subject: Fix C++ ow binary to produce translations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Node::mark and Node::score uninitialized, causing segfaults in topological_sort — add default initializers (0, 0.0) - odenwald.cc called incomplete sv_path() + exit(1) instead of viterbi_path() - viterbi_path: add reset() before topological_sort, initialize best_edge to nullptr - derive: off-by-one in NT order indexing — start j at 1 and use order[j]-1 (1-indexed alignment map) - read: ifs.readsome() returns 0 on macOS — use ifs.read() + ifs.gcount() - manual() signature: add missing Vocabulary parameter - Remove gperftools/tcmalloc dependency from Makefile Co-Authored-By: Claude Opus 4.6 --- src/hypergraph.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/hypergraph.hh') diff --git a/src/hypergraph.hh b/src/hypergraph.hh index 7a268c3..d782c9e 100644 --- a/src/hypergraph.hh +++ b/src/hypergraph.hh @@ -48,10 +48,10 @@ struct Node { string symbol; short left; short right; - score_t score; + score_t score = 0.0; vector incoming; vector outgoing; - unsigned int mark; + unsigned int mark = 0; inline bool is_marked() { return mark >= incoming.size(); }; friend ostream& operator<<(ostream& os, const Node& n); @@ -98,7 +98,7 @@ void write(Hypergraph& hg, vector& rules, const string& fn); // FIXME void -manual(Hypergraph& hg, vector& rules); +manual(Hypergraph& hg, vector& rules, G::Vocabulary& vocab); } // namespace -- cgit v1.2.3