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 6C6166D4662; Wed, 22 Nov 2023 02:16:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6C6166D4662 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1700608615; bh=M+1/LoFIuWAWl+jnOk3+Vs19RhEiFvJWat/fVqTqoxk=; h=To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=mjdsQmB9DoZC5EUO8MDDnYq9A0xjE37Mj6yF3I9Zgf/JRUAsYD+WvpaRfV4nql3Ci pOFnjkFWQrrN5FkWPfm6Yci7WxnwvrUCMMN8Plypok+ERAeH2ZpS/Nb3nf+emZG0Mm Z4cbCf/xMM6e4t6DjHTnXW0v7paPEs3Rh/TrU3o8= Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (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 1C8886D4662 for ; Wed, 22 Nov 2023 02:16:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1C8886D4662 Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-507bd644a96so8724382e87.3 for ; Tue, 21 Nov 2023 15:16:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700608613; x=1701213413; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=o3Us2FTqpvYRYiMTtkr06SQGwEwrGr2yQnPuQdJGC7A=; b=FqJC419iQ3ZI3oPVAhLGdvY2+xOZc+oxOewUQ+Zz1kTqYgK9APK4/FknGoTABsIuOr PTlJIetOTBu/01deKYcf4TvDnKXPmqyOMqOz745HrcfNo9xO14fl7Sn1Byy1k+H10uIt d5nTINAjtzHGi8LJCE+j2sfQk4/uj3yMmNNKCsT0tJzrXVCL5uT/6HNIH3NpJ7+zDf8t bCVOiSYsstf7yTe8EDwP9/wb3TqYcb0d7QWNqLf2GSys8heCfwNPEvXKaKNYAuMwFBsT v5cS8VbcnQR190OrB09E0n8pAzChHesny93SUW0ilMll/DMZQhnNY4A4+MauXoLU1F5Q G0LQ== X-Gm-Message-State: AOJu0YxSWwSs0ewuJNU5T+32O6glirL2SrcGSPSzMWOYopMeXkxBWYoD /t/IX++WLT182JoJ2mtGu/Afxl3FfMIXQw== X-Google-Smtp-Source: AGHT+IFOEVi0I4SThEHQWAuPYKNAvRz9F1VJhjsXrPwBFY53xMVw2OVCAscXeobzGsmdNraRaScdpg== X-Received: by 2002:a05:6512:1248:b0:503:95b:db0a with SMTP id fb8-20020a056512124800b00503095bdb0amr721307lfb.12.1700608612146; Tue, 21 Nov 2023 15:16:52 -0800 (PST) Received: from localhost.localdomain (95-24-1-238.broadband.corbina.ru. [95.24.1.238]) by smtp.gmail.com with ESMTPSA id z1-20020a056512370100b004f755ceafbcsm1636371lfr.217.2023.11.21.15.16.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Nov 2023 15:16:51 -0800 (PST) To: tarantool-patches@dev.tarantool.org, sergeyb@tarantool.org, skaplun@tarantool.org, m.kokryashkin@tarantool.org Cc: Maksim Kokryashkin Date: Wed, 22 Nov 2023 02:16:44 +0300 Message-Id: <20231121231647.92696-1-max.kokryashkin@gmail.com> X-Mailer: git-send-email 2.39.3 (Apple Git-145) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit v2 0/3] Improve error reporting on stack overflow. 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: Maksim Kokryashkin via Tarantool-patches Reply-To: Maksim Kokryashkin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This patchset fixes error reporting on stack overflow for situation when an xpcall error handler can use a bit more space. Issues: https://github.com/luajit/luajit/issues/962 https://github.com/tarantool/tarantool/issues/9145 PR: https://github.com/tarantool/tarantool/pull/9380 Branch: https://github.com/tarantool/luajit/tree/fckxorg/lj-962-error-reporting-on-stack-overflow Changes in v2: - Fixed comments as per review by Sergey. Mike Pall (3): Improve error reporting on stack overflow. Cleanup stack overflow handling. Follow-up fix for stack overflow handling cleanup. src/lj_state.c | 15 +++-- .../lj-962-premature-stack-overflow.test.c | 64 +++++++++++++++++++ .../lj-603-err-snap-restore.test.lua | 1 + .../lj-962-stack-overflow-report.test.lua | 9 +++ .../lj-962-stack-overflow-report/script.lua | 2 + test/tarantool-tests/utils/exec.lua | 15 ++++- 6 files changed, 99 insertions(+), 7 deletions(-) create mode 100644 test/tarantool-c-tests/lj-962-premature-stack-overflow.test.c create mode 100644 test/tarantool-tests/lj-962-stack-overflow-report.test.lua create mode 100644 test/tarantool-tests/lj-962-stack-overflow-report/script.lua -- 2.39.3 (Apple Git-145)