From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id E1372430408 for ; Wed, 12 Aug 2020 23:34:37 +0300 (MSK) References: <53095890-c0b6-6eae-b3b1-9898e7ca05e3@tarantool.org> <8d39159c-31d3-1394-fb04-4793da531772@tarantool.org> <184a98de-9f49-be82-39a5-84b3c7510697@tarantool.org> From: Vladislav Shpilevoy Message-ID: <8b323479-64fd-f6d1-d7ec-69de463e0988@tarantool.org> Date: Wed, 12 Aug 2020 22:34:35 +0200 MIME-Version: 1.0 In-Reply-To: <184a98de-9f49-be82-39a5-84b3c7510697@tarantool.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Tarantool-patches] [PATCH 1/2] tuple: fix multikey field JSON access crash List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aleksandr Lyapunov , tarantool-patches@dev.tarantool.org, korablev@tarantool.org >> +        if (offset_slot_hint != NULL) { >>               *offset_slot_hint = offset_slot; >> +            /* >> +             * Hint is never requested for a multikey field without >> +             * providing a concrete multikey index. >> +             */ >> +            assert(!field->is_multikey_part || >> +                   (multikey_idx != MULTIKEY_NONE && >> +                field->is_multikey_part)); > The last '&& field->is_multikey_part' is excess. Indeed, a stupid mistake. Somewhy I was sure it was needed yesterday. Dropped now. ==================== assert(!field->is_multikey_part || - (multikey_idx != MULTIKEY_NONE && - field->is_multikey_part)); + multikey_idx != MULTIKEY_NONE); ====================