4 Jun
2022
4 Jun
'22
9:22 a.m.
Hi, The comparison in `node::operator<` in time_antipode.cpp seems to be missing a dereference operation in return statement: if (!(*vert==*n.vert)) return (vert<n.vert); This causes the comparator to be non-transitive: (gdb) p *keys[5] < *keys[4] $5 = true (gdb) p *keys[4] < *keys[8] $6 = true (gdb) p *keys[5] < *keys[8] $7 = false which violates the strict weak ordering requirements of std::map (https://en.cppreference.com/w/cpp/named_req/Compare). Such violations may in practice result in non-deterministic behavior or crashes. The issue was found with [SortChecker++ tool](https://github.com/yugr/sortcheckxx). Best regards, Yuri Gribov