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 3615C21E66A; Wed, 18 Jan 2023 23:20:53 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3615C21E66A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1674073253; bh=7w+Kj9j0Y5r2G2SXq420QnWCIAj94SjHziHwYfeJNFo=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=kWdIt3k4cj4qjAOEJhaThdPu9HIqyKRJaMQAJmbRHSOXAwhJTK8peUo9UWyRmzgpY txJ20ReNw7U1cnLqrmdhrrytLbc3SGsfWAbz8GBfspxYE/BMVklJx42C4p900y7Oyb 7vqe/f0m9UykgdzJliJ40H+EXUyYwYQN6EnHHVOE= Received: from smtp33.i.mail.ru (smtp33.i.mail.ru [95.163.41.74]) (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 9EF2821E66A for ; Wed, 18 Jan 2023 23:20:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9EF2821E66A Received: by smtp33.i.mail.ru with esmtpa (envelope-from ) id 1pIEuz-00820q-P3; Wed, 18 Jan 2023 23:20:22 +0300 To: Sergey Ostanevich , Maxim Kokryashkin Date: Wed, 18 Jan 2023 23:16:54 +0300 Message-Id: <1588326195edd86f5276ad42143043fbde46abeb.1674068996.git.skaplun@tarantool.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD90D1502B3BE350FE43D89E966E4BF1214A8024498517A0AAB00894C459B0CD1B99999CB11CC83CD6E06100E9984F31B653A1AEED0763AC6E0EFBA94EB484632BD X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7DB84ED444C624799EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006379428F6EA0D091379EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38B6F1F7B995052D5CE28EFCECF07BD9A388BD90C80D703E989CC7F00164DA146DAFE8445B8C89999728AA50765F790063735D2385A5E2B3AC3389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC881F3E54FD4568659F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947C7A515FDF34F84F9C6136E347CC761E074AD6D5ED66289B52698AB9A7B718F8C46E0066C2D8992A16725E5C173C3A84C3135EDF6918C5D223BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE76515C59FC18CEA6D731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5323E4695432ECC5F2F64DE6B9B3D3DB1BB901C25975846AD4EAF44D9B582CE87C8A4C02DF684249CC203C45FEA855C8F X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34682FD2D2951524C593718E0C9A46DE953CE3A278A9B76234B239D8845770C95FF75858A6AAAA2A3B1D7E09C32AA3244CA2DD4615D2BFA41FEFAEAC72A8BB4BB96C24832127668422927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojrgi5U++pMSPln7fc7C8tNA== X-Mailru-Sender: F16D9CAFEEA6770E7B6EAD4ADB3BCAF023D6165864BD7913EF7B82B556437F323DEB18D96A76F102F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A84198E0F3ECE9B5443453F38A29522196 X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit 1/3] sysprof: fix interval parsing in dual-number mode 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: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" When the profiling interval is parsed, `tvisnum()` is used to check that the given value is a number. But in case of dual-number mode this check returns false as far as the given value is an integer, so `tvisnumber()` should be used to cover both cases. --- src/lib_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_misc.c b/src/lib_misc.c index 06fb9f9f..c18d297e 100644 --- a/src/lib_misc.c +++ b/src/lib_misc.c @@ -209,7 +209,7 @@ static int parse_sysprof_opts(lua_State *L, struct luam_Sysprof_Options *opt, in { cTValue *interval = lj_tab_getstr(options, lj_str_newlit(L, "interval")); opt->interval = SYSPROF_DEFAULT_INTERVAL; - if (interval && tvisnum(interval)) { + if (interval && tvisnumber(interval)) { int32_t signed_interval = numberVint(interval); if (signed_interval < 1) return PROFILE_ERRUSE; -- 2.34.1