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 36A8E6F8050; Wed, 22 Nov 2023 17:35:42 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 36A8E6F8050 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1700663742; bh=zlGf+hQAF/G9nI5A/sBQLMaSneZmpQpDWk4PzMbwg3A=; h=To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=exUbiYj/3lGlribBpXNgBWiC3+3KOhKRGU4c2rDQQjIHTWL4MTd0gC+agU6txcydl 4YuJObQyi/5ByI76uOm33KYVEh2uM6Zn7BqO26vIt3ADyrlcP+zqaTDacxF0jTyrz9 gPmT/nAEbCXj2nl7eYa2XODBBtiP+49V4QxOToCE= 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 DB6436F8050 for ; Wed, 22 Nov 2023 17:35:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DB6436F8050 Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-507cd62472dso986851e87.0 for ; Wed, 22 Nov 2023 06:35:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700663740; x=1701268540; 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=mRbGW4Ad/51mP+DLiXSDJV2L9hEw8hxdSpuJjgjDwf4=; b=c2E/OcDRYexZKleQBZK9kQFK/PkjnWPdgzs1z5Ngmp3dAewR6Ojs/1KTzvY4my9gFZ 2IubZvTf82baI1A5wPuFZkMwytcuez+gc3u616/wgDtFufSR1F8mmB0cDdKhYaCZ+i1a ruBNNGYJk3Snwak2Jvm7nWfr+Gl+ZV2d4hAt1Pg5pWyAxW3cPHdBvqJaFp+73ZtCCy/S SQp6w9maaHLFnLuHJu/Cwhq1YGd2q69Ae9ixrQ0lVrPHNqWp7/qhQAiCosi/dlF2h4jp ak2cITXkxpygDKsd8Zq4dZuptxCahmJ1lKAcq9Ywqe2a0Wy0dsHGwe4QosW7+cdKtx5G Gbew== X-Gm-Message-State: AOJu0YxP+8NIxXo0JbktfW4vcOjwh21Bhqhw0dWTmHM3onLCNwMqzoo2 8m5joT9yscutrODGRFtWP+UAGh03wvHd7Y4A X-Google-Smtp-Source: AGHT+IEXhCP2YJqFLuOlx3Eu3cnJjgcDp0ajjeJqPZRGGao87z1sYrlUOeGdNExIH1LLn8NxFLkaxw== X-Received: by 2002:a05:6512:23a6:b0:509:85c9:ff43 with SMTP id c38-20020a05651223a600b0050985c9ff43mr2782620lfv.4.1700663739607; Wed, 22 Nov 2023 06:35:39 -0800 (PST) Received: from localhost.localdomain ([185.205.79.42]) by smtp.gmail.com with ESMTPSA id x15-20020a19e00f000000b005079a3c872esm1894570lfg.240.2023.11.22.06.35.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 06:35:39 -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 17:35:31 +0300 Message-Id: <20231122143534.11330-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 v3 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 v3: - 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 | 86 +++++++++++++++++++ .../lj-603-err-snap-restore.test.lua | 1 + .../lj-962-stack-overflow-report.test.lua | 10 +++ .../lj-962-stack-overflow-report/script.lua | 3 + test/tarantool-tests/utils/exec.lua | 15 +++- 6 files changed, 123 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)