Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

build: warn on missing virtual on base class destructor #846

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bin/dsn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ function(dsn_setup_compiler_flags)
add_compile_options(-Wno-deprecated-declarations)
add_compile_options(-Wno-inconsistent-missing-override)
add_compile_options(-Wno-attributes)
# Must add virtual on all base destructors.
add_compile_options(-Wnon-virtual-dtor)
# -fno-omit-frame-pointer
# use frame pointers to allow simple stack frame walking for backtraces.
# This has a small perf hit but worth it for the ability to profile in production
Expand Down
4 changes: 2 additions & 2 deletions include/dsn/utility/work_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class work_queue
_current_op_count = 0;
}

~work_queue()
virtual ~work_queue()
{
scope_lk l(_lock);
assert(_hdr.is_empty());
Expand Down Expand Up @@ -106,4 +106,4 @@ class work_queue
protected:
slist<T> _hdr;
};
}
}
6 changes: 3 additions & 3 deletions thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ set(OSS_URL_PREFIX "http://pegasus-thirdparties.oss-cn-beijing.aliyuncs.com")
message(STATUS "Setting up third-parties...")

ExternalProject_Add(boost
URL ${OSS_URL_PREFIX}/boost_1_69_0.tar.bz2
https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.bz2
URL_MD5 a1332494397bf48332cb152abfefcec2
URL ${OSS_URL_PREFIX}/boost_1_71_0.tar.bz2
https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2
URL_MD5 4cdf9b5c2dc01fb2b7b733d5af30e558
CONFIGURE_COMMAND ./bootstrap.sh --prefix=. --with-libraries=system,filesystem,regex --with-toolset=gcc
BUILD_COMMAND ./b2 toolset=gcc cxxflags=-fPIC cxxstd=11 install
INSTALL_COMMAND cp -R include/boost ${TP_OUTPUT}/include && cp -R lib ${TP_OUTPUT}/
Expand Down