Tarantool development patches archive
 help / color / mirror / Atom feed
From: Igor Munkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Kaplun <skaplun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit] Fix os.date() for wider libc strftime() compatibility.
Date: Mon, 20 Feb 2023 09:57:34 +0000	[thread overview]
Message-ID: <Y/NEDsh/eTqB2Scd@tarantool.org> (raw)
In-Reply-To: <20230201074651.8282-1-skaplun@tarantool.org>

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 <mike>
> 
> 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
> 

<snipped>

> -- 
> 2.34.1
> 

-- 
Best regards,
IM

      parent reply	other threads:[~2023-02-20  9:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01  7:46 Sergey Kaplun via Tarantool-patches
2023-02-01 23:41 ` Maxim Kokryashkin via Tarantool-patches
2023-02-02 19:28   ` Sergey Kaplun via Tarantool-patches
2023-02-02 21:08     ` Maxim Kokryashkin via Tarantool-patches
2023-02-02 22:28 ` sergos via Tarantool-patches
2023-02-03  8:32   ` Sergey Kaplun via Tarantool-patches
2023-02-03 13:28     ` sergos via Tarantool-patches
2023-02-20  9:57 ` Igor Munkin via Tarantool-patches [this message]

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=Y/NEDsh/eTqB2Scd@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit] Fix os.date() for wider libc strftime() compatibility.' \
    /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