Closed cloudnoize closed 1 year ago
Actually the issue is even more profound - The job that wraps the IThresholdAccumulator, AsynchProofCreationJob , doesn't get deleted after its execution as well.
When deleting AsynchProofCreationJob or the IThresholdAccumulator, the replica crashed on PartialProofsSet::resetAndFree().
`#1 0x000055e7e1d5404e in bftEngine::impl::PartialProofsSet::resetAndFree (this=0x55e7e26a53c0) at /concord-bft/bftengine/src/bftengine/messages/PartialProofsSet.cpp:45
newFirstIndexOfActiveWindow=151) at /concord-bft/bftengine/src/bftengine/SequenceWithActiveWindow.hpp:104
This code has been refactored, and therefore the issue is no longer applicable.
Describe the bug At PartialProofsSet::tryToCreateFullProof() the line - IThresholdAccumulator* acc = thresholdAccumulator->clone() creates a new object by calling - virtual IThresholdAccumulator clone() { return new BlsThresholdAccumulator(this); } (file BlsThresholdAccumulator.h)
The pointer is being passed to AsynchProofCreationJob for async execution, but I don't see any code that deletes it.
Expected behavior delete the created object by using std ::unique_ptr