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 575251A3CC1; Mon, 20 Feb 2023 12:59:18 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 575251A3CC1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1676887158; bh=XyYcEUPFFJrav8R9N+88YdCm0FPoqsM8F5+irvR8AtY=; 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=PImQh38a4siW/dSmAPnSc1hzQsfbXzPWAX+67I2Cfsad4jUvE5VIRB3OM5KgQnmTb PR9NUeLr419ivbq2KELSGqAgYXIbcxa6TAvcH+gh4O+ED4uWyaO5QzitmdlRcCzN/1 +XYY/7BylJsAvi+dJEHHWq/P/Dv3gDpDGyj6vlL4= Received: from smtp43.i.mail.ru (smtp43.i.mail.ru [95.163.41.66]) (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 883771A3CC1 for ; Mon, 20 Feb 2023 12:59:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 883771A3CC1 Received: by smtp43.i.mail.ru with esmtpa (envelope-from ) id 1pU2wy-006P2K-KM; Mon, 20 Feb 2023 12:59:13 +0300 Date: Mon, 20 Feb 2023 09:57:34 +0000 To: Sergey Kaplun Message-ID: References: <20230201074651.8282-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230201074651.8282-1-skaplun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD9806C989EC2150E33C13C456498AA74328729F4FEF7F411FF182A05F5380850405C87780471DA34C277ADDFC9FEB2B6A92F1D745AF4EF38339E4337A4A9A8BA49 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78E8764B5BC580342EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006375B4C42A189C515578638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D87A59F2B5E79E50CFA452BF2DFF43DE83117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC406C66621D3021AFA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735204B6963042765DA4B6FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE7B96B19DC4093321A9D86F9317F2E7ACD8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE34E7D9683544204AFAD7EC71F1DB88427C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F79006371F24DFF1B2961425731C566533BA786AA5CC5B56E945C8DA X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34E69981C39E7B068AA1A002DF13339F9279206FA7B69F2E45FAE9610D4A67D4D7668AE0550AFFA6FE1D7E09C32AA3244CD7D0433841D7B527C4BF18C19ABD1FFD853296C06374E602927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojUcEWEXRz/x8Fhkxt/3PeoQ== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D5317AC056633A56333FCDDD4DFFE879D7B3F236D6C5F74DBBCB2326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] Fix os.date() for wider libc strftime() compatibility. 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, I've checked the patch into all long-term branches in tarantool/luajit and bumped a new version in master, 2.10 and 1.10. On 01.02.23, Sergey Kaplun via Tarantool-patches wrote: > From: Mike Pall > > Thanks to Jesper Lundgren. > > (cherry picked from commit fc63c938b522e147ea728b75f385728bf4a8fc35) > > When `strftime()` returns empty result (for example, for "%p" on some > locales or when LuaJIT is built with musl's `strftime()` and format > string is invalid), the `os.date()` endless retries to format result > and reallocates buffer for resulting string. This leads to OOM. > > This patch limits amount of retries by 4. > > Sergey Kaplun: > * added the description and the test for the problem > > Part of tarantool/tarantool#8069 > --- > > PR: https://github.com/tarantool/tarantool/pull/8237 > Issues: > * https://github.com/LuaJIT/LuaJIT/issues/463 > * https://github.com/tarantool/tarantool/issues/8069 > Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-463-os-date-oom-full-ci > > src/lib_os.c | 4 ++-- > .../lj-463-os-date-oom.test.lua | 19 +++++++++++++++++++ > 2 files changed, 21 insertions(+), 2 deletions(-) > create mode 100644 test/tarantool-tests/lj-463-os-date-oom.test.lua > > -- > 2.34.1 > -- Best regards, IM