Skip to content

Commit

Permalink
Merge pull request #4824 from YosysHQ/emil/fix-witness-stack-overflow
Browse files Browse the repository at this point in the history
yw: fix unintensional recursion in hash_into
  • Loading branch information
widlarizer authored Dec 19, 2024
2 parents 281e474 + a6bd8ff commit 301d967
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kernel/yw.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ struct IdPath : public std::vector<RTLIL::IdString>
bool has_address() const { int tmp; return get_address(tmp); };
bool get_address(int &addr) const;

Hasher hash_into(Hasher h) const { h.eat(*this); return h; }
Hasher hash_into(Hasher h) const {
h.eat(static_cast<const std::vector<RTLIL::IdString>&&>(*this));
return h;
}
};

struct WitnessHierarchyItem {
Expand Down

0 comments on commit 301d967

Please sign in to comment.