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

Memory leak in join WT_CURSOR with custom extractor

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.9.0, 3.2.11, 3.4.0-rc3
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Storage 2016-11-21

      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.

        1. wt.c
          4 kB

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

              Created:
              Updated:
              Resolved: