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

Fix memory leak error for csuite build directory option

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.0.0, 5.3.0, 5.2.0-rc5
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • 1
    • Storage - Ra 2022-01-10

      https://evergreen.mongodb.com/task/wiredtiger_feature_ubuntu2004_asan_csuite_wt3120_filesys_test_90ec3c65f01be03063a1bdf73f6a572a8f767857_21_12_23_05_40_08

      https://evergreen.mongodb.com/task/wiredtiger_feature_ubuntu2004_asan_csuite_wt2909_checkpoint_integrity_test_90ec3c65f01be03063a1bdf73f6a572a8f767857_21_12_23_05_40_08

      Our ASAN variant in the evergreen feature branch is detecting LeakSanitizer errors when running the wt3120-filesys & wt2909_checkpoint_integrity csuite tests. We get the following error:

       

      [2021/12/23 06:36:16.411] =================================================================
      [2021/12/23 06:36:16.411] ==132599==ERROR: LeakSanitizer: detected memory leaks
      [2021/12/23 06:36:16.411] Direct leak of 66 byte(s) in 1 object(s) allocated from:
      [2021/12/23 06:36:16.411]     #0 0x4b02ed in strdup /data/mci/8a325c5dac104a1f376737aa7d08a24c/toolchain-builder/tmp/build-llvm.sh-9LL/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:447:3
      [2021/12/23 06:36:16.411]     #1 0x4f74b5 in dstrdup /data/mci/ffb32f27289d27862cdf1a5212edf17c/wiredtiger/cmake_build/../test/utility/misc.c:452:14
      [2021/12/23 06:36:16.500] SUMMARY: AddressSanitizer: 66 byte(s) leaked in 1 allocation(s).
      [2021/12/23 06:36:16.500] Aborted (core dumped)

      The above error is due to the CTest invocation of wt3120-filesys & wt2909_checkpoint_integrity passing in a build directory argument (-b). This particular option allocates memory to hold the build directory path string but doesn't free the memory on exit/cleanup.

      Definition of Done:

      • Free the memory backing the build directory argument on testutil_cleanup.

       

            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: