New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memory leak in range searches #854
Comments
Comment from lkrispen (@elkris) at 2013-09-19 13:35:43 The leak is caused by this call: The data component in cur_key is allocated and will be freed by DBT_FREE_PAYLOAD, but there are several calls to cursor->c_get(cursor, &cur_key,...) and only the last allocation is freed |
Comment from rmeggins (@richm) at 2013-10-05 04:17:55 Where is saved_key freed? The call to
was removed |
Comment from nhosoi (@nhosoi) at 2013-10-05 04:32:55 ldap/servers/slapd/ldaputil.c
|
Comment from mreynolds (@mreynolds389) at 2013-10-07 19:41:48 Replying to [comment:5 richm]:
Its gets freed on line 704, but it looks like there is one more place where we need to check if cur_key != the saved key. |
Comment from mreynolds (@mreynolds389) at 2013-10-07 19:45:22 Replying to [comment:6 nhosoi]:
I free the original value, and the copy gets freed later on line 1126. |
Comment from mreynolds (@mreynolds389) at 2013-10-07 19:58:17 revision |
Comment from rmeggins (@richm) at 2013-10-07 21:07:57 Replying to [comment:7 mreynolds389]:
This is line 704 after the latest patch:
This is line 704 before patching:
|
Comment from mreynolds (@mreynolds389) at 2013-10-07 21:22:22 Replying to [comment:9 richm]:
That was with the old patch. It is line 709 with the new one: error: When we get to the end, cur_key is always equal to saved_key. |
Comment from rmeggins (@richm) at 2013-10-07 22:11:22 ack |
Comment from mreynolds (@mreynolds389) at 2013-10-07 22:23:38 git merge ticket47517 git push origin master commit b737882 |
Comment from mreynolds (@mreynolds389) at 2013-10-08 20:30:52 Checked into 1.3.1
Partially checked into 1.3.0
Partially checked into 1.2.11
|
Comment from mreynolds (@mreynolds389) at 2013-10-08 20:57:10 Ticket has been cloned to Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1016717 |
Comment from rmeggins (@richm) at 2013-10-11 20:27:32 86000e4..2dd2489 389-ds-base-1.3.2 -> 389-ds-base-1.3.2 |
Comment from mreynolds (@mreynolds389) at 2017-02-11 23:04:14 Metadata Update from @mreynolds389:
|
Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/47517
In a range search like
ldapsearch ... -b "cn=changelog" "(&(changenumber>=74)(changenumber<=84))"
valgrind reports the following memory leak:
==26736== 12 bytes in 3 blocks are definitely lost in loss record 128 of 1,619
==26736== at 0x4A0881C: malloc (vg_replace_malloc.c:270)
==26736== by 0x319DE4F8CB: slapi_ch_malloc (ch_malloc.c:155)
==26736== by 0x390F752176: __os_umalloc (in /usr/lib64/libdb-5.2.so)
==26736== by 0x390F71493D: __db_retcopy (in /usr/lib64/libdb-5.2.so)
==26736== by 0x390F6EC9D3: __dbc_iget (in /usr/lib64/libdb-5.2.so)
==26736== by 0x390F6FBC0B: __dbc_get_pp (in /usr/lib64/libdb-5.2.so)
==26736== by 0x93D7FFF: idl_new_range_fetch (idl_new.c:466)
==26736== by 0x93EB2A4: index_range_read_ext (index.c:1459)
==26736== by 0x93D02DC: range_candidates (filterindex.c:619)
==26736== by 0x93D0889: list_candidates (filterindex.c:773)
==26736== by 0x93CEF11: filter_candidates_ext (filterindex.c:167)
==26736== by 0x93D0B86: list_candidates (filterindex.c:836)
The text was updated successfully, but these errors were encountered: