Skip to content

Commit 301d967

Browse files
authored
Merge pull request #4824 from YosysHQ/emil/fix-witness-stack-overflow
yw: fix unintensional recursion in hash_into
2 parents 281e474 + a6bd8ff commit 301d967

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kernel/yw.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ struct IdPath : public std::vector<RTLIL::IdString>
3535
bool has_address() const { int tmp; return get_address(tmp); };
3636
bool get_address(int &addr) const;
3737

38-
Hasher hash_into(Hasher h) const { h.eat(*this); return h; }
38+
Hasher hash_into(Hasher h) const {
39+
h.eat(static_cast<const std::vector<RTLIL::IdString>&&>(*this));
40+
return h;
41+
}
3942
};
4043

4144
struct WitnessHierarchyItem {

0 commit comments

Comments
 (0)