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

Memory leak in join WT_CURSOR with custom extractor

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.9.0, 3.2.11, 3.4.0-rc3
    • Labels:
      None
    • Sprint:
      Storage 2016-11-21

      Description

      Hi!

      I use a custom extractor for the join index.

      And it seems that there is a memory leak when using custom extractor, which calls result_cursor->set_key()

      After test completion there are some memory blocks remain that have been allocated for the next stack:

              __realloc_func           at os_alloc.c:129:11
              __wt_realloc_noclear     at os_alloc.c:170:10
              __wt_buf_grow_worker     at scratch.c:48:4
              __wt_buf_grow            at buf.i:18:6
              __wt_buf_initsize        at buf.i:61:2
              __wt_cursor_set_keyv     at cur_std.c:365:4
              __wt_cursor_set_key      at cur_std.c:183:2
              custom_extract2
              __curjoin_entry_member   at cur_join.c:727:3
              __curjoin_next           at cur_join.c:780:10
      
      

      The example file is attached.

        Attachments

          Activity

            People

            • Assignee:
              donald.anderson Donald Anderson
              Reporter:
              adunaev Anton Dunaev
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: