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

Fix CMake bug when building cppsuite with TCMalloc

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • WT10.0.1, 5.2.0, 5.0.5
    • None
    • None
    • 1
    • Storage - Ra 2021-11-15

    Description

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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: