From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org Cc: kostja@tarantool.org Subject: [tarantool-patches] [PATCH v2 2/5] swim: fix a 'use after free' in SWIM tests Date: Sat, 8 Jun 2019 12:31:18 +0200 [thread overview] Message-ID: <96b348e93381fa6b3884f11fd1a4971c268cb105.1559989748.git.v.shpilevoy@tarantool.org> (raw) In-Reply-To: <cover.1559989748.git.v.shpilevoy@tarantool.org> It is a miracle, but somehow it worked until I changed a couple of places. Here objects stored in an rlist are freed, but not deleted from the list. The list is reused after that. --- test/unit/swim_test_transport.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/unit/swim_test_transport.c b/test/unit/swim_test_transport.c index c4a1dd774..334ac926e 100644 --- a/test/unit/swim_test_transport.c +++ b/test/unit/swim_test_transport.c @@ -85,6 +85,7 @@ swim_test_packet_new(const char *data, int size, const struct sockaddr_in *src, static inline void swim_test_packet_delete(struct swim_test_packet *p) { + rlist_del_entry(p, in_queue); free(p); } -- 2.20.1 (Apple Git-117)
next prev parent reply other threads:[~2019-06-08 10:31 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-06-08 10:31 [tarantool-patches] [PATCH v2 0/5] SWIM on_member_update Vladislav Shpilevoy 2019-06-08 10:31 ` [tarantool-patches] [PATCH v2 1/5] test: create isolated ev_loop for swim unit tests Vladislav Shpilevoy 2019-06-08 14:32 ` [tarantool-patches] " Konstantin Osipov 2019-06-08 10:31 ` Vladislav Shpilevoy [this message] 2019-06-08 14:32 ` [tarantool-patches] Re: [PATCH v2 2/5] swim: fix a 'use after free' in SWIM tests Konstantin Osipov 2019-06-08 10:31 ` [tarantool-patches] [PATCH v2 3/5] swim: allow to set triggers on member updates Vladislav Shpilevoy 2019-06-08 14:35 ` [tarantool-patches] " Konstantin Osipov 2019-06-08 10:31 ` [tarantool-patches] [PATCH v2 4/5] swim: call swim:new/delete via Lua C, not via FFI Vladislav Shpilevoy 2019-06-08 14:35 ` [tarantool-patches] " Konstantin Osipov 2019-06-08 11:04 ` [tarantool-patches] Re: [PATCH v2 0/5] SWIM on_member_update Vladislav Shpilevoy 2019-06-08 11:06 ` Vladislav Shpilevoy
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=96b348e93381fa6b3884f11fd1a4971c268cb105.1559989748.git.v.shpilevoy@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=kostja@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] [PATCH v2 2/5] swim: fix a '\''use after free'\'' in SWIM tests' \ /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