From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id A133A6EC5B; Wed, 12 May 2021 00:24:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A133A6EC5B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1620768279; bh=MtefEA2Aa01/6YbGV8krfUt6TPdpGlNho7St7rw/i7c=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=FXMRpjBVLfYQq52Xeomg0RqXfsrfuwVes/4w1t5fwYpU7/PsmbZ4LYGXgnQ19Fgap 36yBLlE+ZjsGIJMl8Vwd8h4ALpvMn+gOM7yQyL+NrQVga9x/UP/RhgIueU2IeAkl72 K0zVwZjPfABzhe69YYI9efu6+ICPj+LX3zffOp70= Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1095E6EC5B for ; Wed, 12 May 2021 00:24:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1095E6EC5B Received: by mail-lj1-f177.google.com with SMTP id p20so2979404ljj.8 for ; Tue, 11 May 2021 14:24:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=pswWQBthRJZyMs39/TvnIjRAnlX8muivgDqlA9zkmWo=; b=eETsRcjo502888p77dw77TNKTSZXEUl9l/hw3qisNiavWD3jvIXlMtupcPFAx0/Vhl 2C9wtHKkTn8vrITJDzhRiSmFn58hIHND2w1qRimgg7z5845KpG/Wquw2WBN8diKk65QM oVUSLLf4UOvfI5hbUPfzQ3bYUeZl8MtYYvHSl6D2MbmzNxin96Pk8SUdH3tssHjWfrDp LFw+ihHPc2PVO8MuceYyy1w/3J3ZPOrw3UFLk8iewO+Ilo4DBaq1Hm3SqTFjYgMFOwR0 V+8zQ1GarmvrOFSz5NNonH1VI6zrPzPMTTDAs4aYiQppaCn8vWSZiZ96XyNkIaMDB2hl a+FA== X-Gm-Message-State: AOAM530TtVnh0BBbaA0OiJMYZKX0bYHmnVKssuLRhhdrBWUMTizi+Cu3 SnNOBYL6nay5qeSSMiye7T4cCJytgcg= X-Google-Smtp-Source: ABdhPJzMkGT0CR1I9YKptQ4xiY45KbtOhjux6WK/c/lltdeSFB2M9aTtYAaTkDx/5o/ryCazMB37vw== X-Received: by 2002:a2e:4c19:: with SMTP id z25mr5254623lja.47.1620768277948; Tue, 11 May 2021 14:24:37 -0700 (PDT) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id z11sm1986026lfu.135.2021.05.11.14.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 14:24:37 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 8534F5A000B; Wed, 12 May 2021 00:24:36 +0300 (MSK) Date: Wed, 12 May 2021 00:24:36 +0300 To: Vladislav Shpilevoy Message-ID: References: <20210504155819.290874-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.6 (2021-03-06) Subject: Re: [Tarantool-patches] [PATCH v3 00/10] fix say_x format and rework fibers X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Cc: tml Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Wed, May 12, 2021 at 12:15:39AM +0300, Cyrill Gorcunov wrote: > On Tue, May 11, 2021 at 10:13:01PM +0200, Vladislav Shpilevoy wrote: > > Hi! Good job on the fixes, really! > > > > Although function lbox_fiber_statof() still uses lua_pushinteger(): > > > > Thanks a huge for catching it, Vlad. Here is an update. Squashed > to patch 1 "fiber: use uint64_t for fiber IDs" and force pushed. And one more addon (squashed) because 20 chars won't fit 8 byte unsiged together with "fiber: " prefix. Also I'm a bit worried of static int lbox_fiber_top_entry(struct fiber *f, void *cb_ctx) { struct lua_State *L = (struct lua_State *) cb_ctx; --> lua_pushfstring(L, "%f/%s", (lua_Number)f->fid, f->name); why do we use float formate here at all?! --- src/lua/fiber.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua/fiber.c b/src/lua/fiber.c index 0d28fce8c..83c259c45 100644 --- a/src/lua/fiber.c +++ b/src/lua/fiber.c @@ -748,7 +748,7 @@ lbox_fiber_serialize(struct lua_State *L) static int lbox_fiber_tostring(struct lua_State *L) { - char buf[20]; + char buf[32]; struct fiber *f = lbox_checkfiber(L, 1); snprintf(buf, sizeof(buf), "fiber: %llu", (long long)f->fid); -- 2.31.1