encryptogroup / ABY

ABY - A Framework for Efficient Mixed-protocol Secure Two-party Computation
GNU Lesser General Public License v3.0
463 stars 132 forks source link

abstract class without virtual destructor #19

Closed lenerd closed 7 years ago

lenerd commented 7 years ago

The class Sharing is an abstract base class, but its destructor is not declared virtual.

see C++ FAQ

src/abycore/aby/abyparty.cpp:126:3: warning: delete called on 'Sharing' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
                delete m_vSharings[S_BOOL];
                ^
src/abycore/aby/abyparty.cpp:128:3: warning: delete called on 'Sharing' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
                delete m_vSharings[S_YAO];
                ^
src/abycore/aby/abyparty.cpp:130:3: warning: delete called on 'Sharing' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
                delete m_vSharings[S_YAO_REV];
                ^
src/abycore/aby/abyparty.cpp:132:3: warning: delete called on 'Sharing' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
                delete m_vSharings[S_ARITH];
dd23 commented 7 years ago

Thanks for reporting. This has been fixed with the most recent merge from master in f57e24669e445d2c19924dcd5069aa13f4a64da4