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 EE3126E454; Tue, 1 Mar 2022 02:54:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EE3126E454 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1646092492; bh=ABesC2//RrZomRddI1JZMPVtXdTrag0Ue+DfNXpXK0U=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=wVV1rqT8aLkKPddgsW0Q2Dnce+mKHDLiCUqbwDP05EV4e8Bqsa9OTw9ZuN2sd/2xk JDE8u49WeBFk93HaB4oLVqVAYpZ6AfVdC946pFH9jRvP6sgYVqA5thRHABUpN1uAKK zh64XmZ5oHg6gu1yIKs8XIysR5JK+0dggatwhrNo= Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (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 C52966E454 for ; Tue, 1 Mar 2022 02:54:49 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C52966E454 Received: by mail-lf1-f42.google.com with SMTP id i11so24151872lfu.3 for ; Mon, 28 Feb 2022 15:54:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RAHUneMxy1IYjSAUykJBL4w6NXL0RUZY0+vBUmS6tKk=; b=MDPqYW5q2NdiwKgQhP/mFAqh7mXozxN4FttoGXMtCP3DMkveEXtDuqxrcFIons7oVJ WUd526oo08+G6cbe4egH2EHjxqsjmdV/011ZRfIqjJGjSrEi6RQaqXeR2TCRGGBdX9IM haiFSHVHMiheyOmvsK4QAb0yiJAJ+SjflfmU9zcw8ARd/of6wHngcN8CpgDPcOddUWUx tySulOmgFZA9ZL2l2+T6CasEOCm/whBFf9HNYT3Lkt5zlFmEUuUeMcWq5BPT/VJuVoLr 9Tiw9TGdPWhIqbzbJVvwL/HLULroQORqmhwlNYLANakObsJ0+Tjx1XUDkirD4f4qxHzA O7kw== X-Gm-Message-State: AOAM530G9VZF1ElCW4rQAzMHdxaXT04jniGyGaFE8lgYqPaTrrzgWGyb uxhBJM0csruc/5SiuWqM63IcoUgdTAkF9A== X-Google-Smtp-Source: ABdhPJzDY1X04Yd45VF/eguJvYV8u75hzQgr2IVoTYzs7G8uE5teep+dbxHuoOnY/RaUZakU/fEvmw== X-Received: by 2002:a05:6512:70d:b0:438:6747:fc01 with SMTP id b13-20020a056512070d00b004386747fc01mr14282531lfs.653.1646092488851; Mon, 28 Feb 2022 15:54:48 -0800 (PST) Received: from localhost.localdomain ([93.175.11.199]) by smtp.gmail.com with ESMTPSA id n13-20020a2ebd0d000000b00245cf76eb5asm1600383ljq.89.2022.02.28.15.54.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 15:54:48 -0800 (PST) X-Google-Original-From: Maxim Kokryashkin To: tarantool-patches@dev.tarantool.org, imun@tarantool.org, skaplun@tarantool.org Date: Tue, 1 Mar 2022 02:54:45 +0300 Message-Id: <20220228235445.1841219-1-m.kokryashkin@tarantool.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit v2] test: adapt test checking reversed function 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: Maxim Kokryashkin via Tarantool-patches Reply-To: Maxim Kokryashkin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" The first fiber in Tarantool has only 512Kb of the stack, which is not enough to handle such a deep call chain. Thus, the chunk of code being considered cores with SIGSEGV as a result of C stack overflow. The test is adapted to Tarantool by decreasing the string length. Resolves tarantool/tarantool#5782 Part of tarantool/tarantool#5870 --- Changes in v2: - Fixed comments as per review by Igor GitHub branch: https://github.com/tarantool/luajit/tree/fckxorg/gh-5782-adapt-deep-nest-gsub-PUC-Rio CI branch: https://github.com/tarantool/tarantool/tree/fckxorg/gh-5782-adapt-test-checking-reversed-function-full-ci Issue: https://github.com/tarantool/tarantool/issues/5782 test/PUC-Rio-Lua-5.1-tests/pm.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/PUC-Rio-Lua-5.1-tests/pm.lua b/test/PUC-Rio-Lua-5.1-tests/pm.lua index e364ff9d..61f437f6 100644 --- a/test/PUC-Rio-Lua-5.1-tests/pm.lua +++ b/test/PUC-Rio-Lua-5.1-tests/pm.lua @@ -206,12 +206,16 @@ function rev (s) return string.gsub(s, "(.)(.+)", function (c,s1) return rev(s1)..c end) end -local x = string.rep('012345', 10) --- FIXME: The first Tarantool's fiber has only 512Kb of stack. --- It is not enough for this recursive call. +-- The first fiber in Tarantool has only 512Kb of the stack, +-- which is not enough to handle such a deep call chain. Thus, +-- the chunk of code being considered cores with SIGSEGV as a +-- result of C stack overflow. +-- +-- This test is adapted to match the stack size of the first fiber in +-- Tarantool by decreasing the string length. -- See also https://github.com/tarantool/tarantool/issues/5782. --- The test is disabled for Tarantool binary. --- assert(rev(rev(x)) == x) +local x = string.rep('01234', 10) +assert(rev(rev(x)) == x) -- gsub with tables -- 2.35.1