From: Kirill Yukhin <kyukhin@tarantool.org>
To: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org,
Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v1] asan: leak unit/swim.test:swim_test_encryption
Date: Fri, 11 Sep 2020 13:38:00 +0300 [thread overview]
Message-ID: <20200911103800.eaegiorlztj256qd@tarantool.org> (raw)
In-Reply-To: <75cc0d4428b08ee24ffeab4acd718ee5709fc2f4.1599674855.git.avtikhon@tarantool.org>
Hello,
On 09 сен 21:08, Alexander V. Tikhonov wrote:
> Found leak issue:
>
> [001] +==41031==ERROR: LeakSanitizer: detected memory leaks
> [001] +
> [001] +Direct leak of 96 byte(s) in 2 object(s) allocated from:
> [001] + #0 0x4d8e53 in __interceptor_malloc (/tnt/test/unit/swim.test+0x4d8e53)
> [001] + #1 0x53560f in crypto_codec_new /source/src/lib/crypto/crypto.c:239:51
> [001] + #2 0x5299c4 in swim_scheduler_set_codec /source/src/lib/swim/swim_io.c:700:30
> [001] + #3 0x511fe6 in swim_cluster_set_codec /source/test/unit/swim_test_utils.c:251:2
> [001] + #4 0x50b3ae in swim_test_encryption /source/test/unit/swim.c:767:2
> [001] + #5 0x50b3ae in main_f /source/test/unit/swim.c:1123
> [001] + #6 0x544a3b in fiber_loop /source/src/lib/core/fiber.c:869:18
> [001] + #7 0x5a13d0 in coro_init /source/third_party/coro/coro.c:110:3
> [001] +
> [001] +SUMMARY: AddressSanitizer: 96 byte(s) leaked in 2 allocation(s).
>
> Prepared minimal issue reproducer:
>
> static void
> swim_test_encryption(void)
> {
> swim_start_test(3);
> struct swim_cluster *cluster = swim_cluster_new(2);
> swim_cluster_set_codec(cluster, CRYPTO_ALGO_AES128, CRYPTO_MODE_CBC,
> "1234567812345678", CRYPTO_AES128_KEY_SIZE);
> swim_cluster_delete(cluster);
> swim_finish_test();
> }
>
> Found that memory allocated for codec creation at crypto_codec_new()
> using swim_cluster_set_codec(). But there was no any memory free for
> it. Decided to integrate at test utilities swim_cluster_delete_codec()
> function for it available for tests.
>
> After this fix removed susspencion on memory leak for unit/swin.test.
>
> Closes #5283
> ---
>
> Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-5283-asan-swim
> Issue: https://github.com/tarantool/tarantool/issues/5283
I've checked your patch into 2.4, 2.5 and master.
--
Regards, Kirill Yukhin
prev parent reply other threads:[~2020-09-11 10:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 18:08 Alexander V. Tikhonov
2020-09-09 21:06 ` Vladislav Shpilevoy
2020-09-10 5:27 ` Alexander V. Tikhonov
2020-09-11 10:38 ` Kirill Yukhin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200911103800.eaegiorlztj256qd@tarantool.org \
--to=kyukhin@tarantool.org \
--cc=avtikhon@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v1] asan: leak unit/swim.test:swim_test_encryption' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox