ceph/cmake/modules
Kefu Chai ff8d6a730b cmake: error out if rocksdb is incompatible w/ tcmalloc
the commit d406f228 in gperf implements a c11 feature used by a
recent change in rocksdb: 16e03882, which uses aligned_alloc().
and 16e03882 in rocksdb was merged after v5.7 was tagged, while
16e03882 in gperf was merged after v2.6.1 was tagged.

because aligned_alloc() is not implemented by tcmalloc until the
not-yet-released 2.6.2, if we call aligned_alloc() in an application
linked against tcmalloc, what gets called will be the glibc's
aligned_alloc(). but if we free() the memory chunk allocated by
aligned_alloc(), the tcmalloc's implementation kicks in, then
InvalidFree() is called, because the memory chunk being freed was
allocated by tcmalloc. in short, "mixing allocators", quote from
Dan Mick.

in rocksdb, aligned_alloc() is used if _ISOC11_SOURCE is defined, this
makes sense, because aligned_alloc() is a C11 function. we could avoid
using it by not defining _ISOC11_SOURCE. but as long as _GNU_SOURCE is
defined, glibc defines _ISOC11_SOURCE. and libstdc++ requires
_GNU_SOURCE, because it uses a fair amount of GNU extensions.

Fixes: http://tracker.ceph.com/issues/21422
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-20 10:23:16 +08:00
..
AddCephTest.cmake
BuildBoost.cmake cmake: do not add dependencies to INTERFACE library on cmake < 3.3 2017-06-21 23:34:51 +08:00
BuildRocksDB.cmake cmake: error out if rocksdb is incompatible w/ tcmalloc 2017-09-20 10:23:16 +08:00
CTags.cmake
Distutils.cmake cmake/Distutils.cmake: make pkg files optional, add bin 2017-08-04 10:25:57 -04:00
FindBacktrace.cmake
FindCython.cmake
FindJeMalloc.cmake
FindLTTngUST.cmake
FindLZ4.cmake cmake: require lz4 v1.7 for building lz4 compressor 2017-08-17 16:01:55 +08:00
FindNSPR.cmake
FindNSS.cmake
FindOpenLdap.cmake
FindPython3Interp.cmake
FindPython3Libs.cmake
Findaio.cmake
Findbabeltrace.cmake
Findblkid.cmake
Findcryptopp.cmake
Finddpdk.cmake os/bluestore: fix build errors when spdk is on 2017-07-05 01:42:10 -04:00
Findfcgi.cmake
Findfio.cmake
Findfuse.cmake
Findgperftools.cmake cmake: detect gperf-tools' version 2017-09-19 13:46:50 +08:00
Findkeyutils.cmake
Findleveldb.cmake
Findpmem.cmake
Findrdma.cmake
Findrocksdb.cmake cmake: detect rocksdb's version 2017-09-19 13:46:50 +08:00
Findsnappy.cmake
Findudev.cmake
Findxfs.cmake cmake: compile libzfs backend conditionally 2017-06-27 23:28:03 +08:00
Findxio.cmake
Findzfs.cmake cmake: compile libzfs backend conditionally 2017-06-27 23:28:03 +08:00
GetGitRevisionDescription.cmake
GetGitRevisionDescription.cmake.in
MergeStaticLibraries.cmake
SIMDExt.cmake Fix ppc64 support for ceph 2017-08-04 10:56:03 +02:00