Nano-node: Track down potential memory leak with rai::vote

Created on 17 Dec 2018  路  1Comment  路  Source: nanocurrency/nano-node

A possible memory leak has been observed. When bootstrapping a node on the live network, the vote uniquer votes container exceeds 1M entries, which is a bit unusual.

bug

Most helpful comment

Tracked this down to an issue with the vote uniquer.

The vote uniquer was calls votes.find(randomHash) which pretty much always returns votes.end(), which it rewrites to votes.begin() and thus would only ever delete references when votes.begin() was free-able.

>All comments

Tracked this down to an issue with the vote uniquer.

The vote uniquer was calls votes.find(randomHash) which pretty much always returns votes.end(), which it rewrites to votes.begin() and thus would only ever delete references when votes.begin() was free-able.

Was this page helpful?
0 / 5 - 0 ratings