Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-8364

Fix CMake bug when building cppsuite with TCMalloc

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.1, 5.2.0, 5.0.5
    • Affects Version/s: None
    • Component/s: None
    • None
    • 1
    • Storage - Ra 2021-11-15

      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).

            Assignee:
            alison.felizzi@mongodb.com Alison Felizzi (Inactive)
            Reporter:
            alison.felizzi@mongodb.com Alison Felizzi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: