When building WiredTiger in CMake with TCMalloc, the cppsuite crashes with the following error:
$ /data/wiredtiger/build_cmake$ ./test/cppsuite/run src/tcmalloc.cc:283] Attempt to free invalid pointer 0x55ee4a7bb0e0 Aborted (core dumped)
This usually happens when tcmalloc attempts to free an address it didn't allocate i.e. allocated by 'libc'. In this failure, CMake builds the cppsuite without tcmalloc, whilst the WiredTiger library is linked against tcmalloc. This meaning two different allocators are being used at runtime. This becomes problematic as it appears the cppsuite is allocating/freeing/sharing memory between itself and WiredTiger and thus leads to the above fault.
To fix this, update the cppsuite to also link against TCMalloc (if WiredTiger is using TCMalloc).