zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DavidLiu (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (ZOOKEEPER-1556) Memory leak reported by valgrind mt version
Date Tue, 24 Oct 2017 04:40:00 GMT

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16216247#comment-16216247
] 

DavidLiu edited comment on ZOOKEEPER-1556 at 10/24/17 4:39 AM:
---------------------------------------------------------------

Use deallocate_String_vector(in generated/zookeeper.jute.h) to fix the memory leak


was (Author: davidliu):
Use free_String_vector to fix the memory leak

> Memory leak reported by valgrind mt version
> -------------------------------------------
>
>                 Key: ZOOKEEPER-1556
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1556
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.4.4
>            Reporter: André Martin
>            Priority: Minor
>
> Valgrind reports the following memory leak when using the c-client (mt):
> ==11674== 18 bytes in 9 blocks are indirectly lost in loss record 14 of 173
> ==11674==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==11674==    by 0xC8064A: ia_deserialize_string (recordio.c:271)
> ==11674==    by 0xC81F2E: deserialize_String_vector (zookeeper.jute.c:247)
> ==11674==    by 0xC842F9: deserialize_GetChildrenResponse (zookeeper.jute.c:874)
> ==11674==    by 0xC7E9F0: zookeeper_process (zookeeper.c:1904)
> ==11674==    by 0xC7FE5B: do_io (mt_adaptor.c:439)
> ==11674==    by 0x4E39E99: start_thread (pthread_create.c:308)
> ==11674==    by 0x5FA6DBC: clone (clone.S:112)
> ==11674== 
> ==11674== 90 (72 direct, 18 indirect) bytes in 49 blocks are definitely lost in loss
record 139 of 173
> ==11674==    at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==11674==    by 0xC81EEE: deserialize_String_vector (zookeeper.jute.c:245)
> ==11674==    by 0xC842F9: deserialize_GetChildrenResponse (zookeeper.jute.c:874)
> ==11674==    by 0xC7E9F0: zookeeper_process (zookeeper.c:1904)
> ==11674==    by 0xC7FE5B: do_io (mt_adaptor.c:439)
> ==11674==    by 0x4E39E99: start_thread (pthread_create.c:308)
> ==11674==    by 0x5FA6DBC: clone (clone.S:112)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message