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 24CDD372533; Tue, 14 Mar 2023 15:01:56 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 24CDD372533 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1678795316; bh=dfrYfcMZEFsvP0Nz3J9JdUsz5p5UrKRToBiF13VPKlI=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=E2YZbIHTJ+cHJn7v0rGId7FfTJKJYUZwd8v3mYKYjvyzc8VfGAro0N/PWw1fI9Krk vUi5N8JV1vY+8/Tjl0afUHvRsyA75jj7qwG8FpQz1+J5LYqL4xLdj8GfvhOaIJPayW d0/g+ZcREiveaeAMF9iVzn3VcFPDS+3RZsiv8lRU= Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 557456ECCD for ; Tue, 14 Mar 2023 15:01:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 557456ECCD Received: by mail-lf1-f46.google.com with SMTP id x17so3549561lfu.5 for ; Tue, 14 Mar 2023 05:01:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678795313; 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=j0JdQyPr0KXu09rHSd4r2vv7LFNE1OO9KimoI1jdmWY=; b=wNo3wGDaeTlM3MwjTVTDDvE/+a68JKUxaBsF0xtZxQtHSlqe/2Zr6K20QhoviLy9Zi yfYFfQpfHeq8QQnNsPJAn9FpevAemV57lV99bpLm+MaEZ7EowTLYDDZISkFDgGThRjf1 uS0l1KNrcDr2zbJHTR1b4cRSPmKAFS6qDEF5YN9FvwPLl1QmFyyrBQDvJ7QRmo4bipSm ZixGkVvCxqFFyQ1AT1EynElOx/ojkHMPpGZDXDYQArqzC/NFyiDxJhb4ko1VJupHzXc6 26ZppMVVHQIZW3rynW416pbi1urKoMboR68HfsIZi72jfUEQV6oVoPE/iXhicaBShw8y 84CQ== X-Gm-Message-State: AO0yUKWyZPgiIUzoZgx+yEg8toTGUa5xaN2P0m5bF1+fRkz+ipcGiwuS dKd45mySKFWMRrFHEDNuJbOeMSfyFqMSqQ== X-Google-Smtp-Source: AK7set+o+eU1uPCn4zsMB0ERX6MKTcF9sADUdI11nt7vbbwDxLZ6aKp1yV1RPXdDRDEMZ0ZszxzXyw== X-Received: by 2002:ac2:5202:0:b0:4e7:4a3c:696 with SMTP id a2-20020ac25202000000b004e74a3c0696mr649354lfl.53.1678795312992; Tue, 14 Mar 2023 05:01:52 -0700 (PDT) Received: from localhost.localdomain (128-69-253-162.broadband.corbina.ru. [128.69.253.162]) by smtp.gmail.com with ESMTPSA id n5-20020ac242c5000000b004db51387ad6sm375106lfl.129.2023.03.14.05.01.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 05:01:52 -0700 (PDT) X-Google-Original-From: Maxim Kokryashkin To: tarantool-patches@dev.tarantool.org, skaplun@tarantool.org, sergos@tarantool.org Date: Tue, 14 Mar 2023 15:01:42 +0300 Message-Id: X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit v2 0/5] jit: add exception unwinding 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" This patchset adopts the LuaJIT machinery for unwinding exceptions raised while trace execution. The snap-restore test is disabled, since after this patchset it requires dynamic calculation for amount of allocated stack slots. That test should be rewritten in a less fragile manner. Changes in v2: - Fixed comments as per review by Sergey - Added the test case for IR_RENAME. Branch: https://github.com/tarantool/luajit/tree/fckxorg/gh-7745-exceptions-on-traces Issue: https://github.com/tarantool/tarantool/issues/7745 PR: https://github.com/tarantool/tarantool/pull/8308 Maxim Kokryashkin (1): test: disable `lj-603-snap-restore` test Mike Pall (4): Handle on-trace OOM errors from helper functions. Disable unreliable assertion for external frame unwinding. OSX: Disable unreliable assertion for external frame unwinding. Fix IR_RENAME snapshot number. Follow-up fix for a32aeadc. doc/status.html | 7 - src/lj_arch.h | 12 + src/lj_asm.c | 86 ++++-- src/lj_dispatch.h | 4 +- src/lj_err.c | 279 +++++++++++++++++- src/lj_err.h | 19 +- src/lj_ffrecord.c | 2 + src/lj_jit.h | 2 + src/lj_mcode.c | 5 +- src/lj_opt_loop.c | 1 + src/lj_record.c | 3 +- src/lj_snap.c | 1 + src/lj_state.c | 1 + src/lj_target_x86.h | 2 + src/lj_trace.c | 61 +++- src/lj_trace.h | 3 + src/lj_vm.h | 3 + src/vm_arm.dasc | 3 +- src/vm_arm64.dasc | 4 +- src/vm_mips.dasc | 9 +- src/vm_mips64.dasc | 10 +- src/vm_ppc.dasc | 3 +- src/vm_x64.dasc | 6 +- src/vm_x86.dasc | 4 +- .../gh-7745-ir-rename.test.lua | 20 ++ .../gh-7745-oom-on-trace.test.lua | 22 ++ .../lj-603-err-snap-restore.test.lua | 4 +- 27 files changed, 516 insertions(+), 60 deletions(-) create mode 100644 test/tarantool-tests/gh-7745-ir-rename.test.lua create mode 100644 test/tarantool-tests/gh-7745-oom-on-trace.test.lua -- 2.39.0