[Tarantool-patches] [PATCH v1 1/1] netbox: fix memleak in lbox_tuple_format_new()

Imeev Mergen imeevma at tarantool.org
Thu Oct 31 19:43:37 MSK 2019


On 10/31/19 6:23 PM, Konstantin Osipov wrote:
> * imeevma at tarantool.org <imeevma at tarantool.org> [19/10/30 14:03]:
>> Memleak appeared due to the fact that when creating a dictionary
>> its reference count is 1 from the beginning. Later, when the
>> dictionary is used to create tuple_format, its reference counter
>> increased by 1 and it became equal to 2. After removing
>> tuple_format, the reference counter for dict decreased by one, so
>> it became equal to 1. Since ref counter is not equal to 0, dict
>> not deleted, causing a memory leak.
>>
>> Closes #4588
> I wonder if you could come up with a test case? Is memory used by
> dict accounted in any stats?
>
I did not find anything in box, and I did not see anything about
the statistics in the tuple_dictionary_new() function. Doesn't
look like we accounting this. At the moment, I can’t come up with
a test.

You think we should add this in stats?



More information about the Tarantool-patches mailing list