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 346725B75C7; Wed, 8 Nov 2023 00:06:24 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 346725B75C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1699391184; bh=htugY1uDWZ4fYtBEs7cKuHOv7MZCfUdNA6Wxt+VXkmQ=; h=To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Px5qfVg5k65vILoxkQz5Mdji5mHQHAjfleI1Ib09i5GaA5inGEKub/ZACE/7i9MCC /mawnpgdaLGsDWyvJ1ViaSIewWYqv325l9zafTSGMrwDd3NqVRGjP6uwUQ9qrq/j9W VKebM/BuY2v1B/CaPhKI5ujVut6L8zPJpSBJW7a4= Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (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 0ABDC5B75C7 for ; Wed, 8 Nov 2023 00:06:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0ABDC5B75C7 Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2c5056059e0so88498921fa.3 for ; Tue, 07 Nov 2023 13:06:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699391182; x=1699995982; 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=qV9D+TgoGBE5i5kKpZ3Nb/RwOppe+WNJ5gP65gFh8zU=; b=YfbgMzYde/cMw1tILJ7ytP+Hi9Du/odVVnVJbhuMzrQdRrFwMRMZNNXXTp2QmZSjnH LMb0z2w7vH/QzmXtSqBRdCvL8obJmB6qxEjrIVqM1Zorm+w2Fei53UM/dlZILjBjZPO1 gyHxTfxK/YrNyRc/ajCNb9Hy7sC4HqA5l9CVnmY9nLKqWbYgcnXTXwsIFkmNuwE5Wdlr ZXonF1vCo371Ch6D7BQ0aOme0mI/QoRFFPtoThS+/0UiGP1tanLZtkTj/NesvRoIEqw0 lNMwS9s4hzo5cXH8/UB8qJD0MbTIe45iimp04N/I6UkFa54kx6TG+mQpnEc5xqBF35+/ Aoag== X-Gm-Message-State: AOJu0YzOfZ2mO4Pq26P6hTrEiChH1mr7WwEAV1yzRGm42q9Qk5HpQhBK QraSQHY2blR2JRq6pdhY38x4wCEF+x9ZUA== X-Google-Smtp-Source: AGHT+IG+rAxTDfQpKez4sxGjazvXhRi0eC8bZcLA53c1n0A9eNtIAxXTtFBK0eUdxa0Rp2ep266b5A== X-Received: by 2002:a05:651c:504:b0:2c5:ffa:375d with SMTP id o4-20020a05651c050400b002c50ffa375dmr144815ljp.11.1699391181708; Tue, 07 Nov 2023 13:06:21 -0800 (PST) Received: from localhost.localdomain (95-24-0-215.broadband.corbina.ru. [95.24.0.215]) by smtp.gmail.com with ESMTPSA id g6-20020a2e9e46000000b002bfb71c076asm1586106ljk.43.2023.11.07.13.06.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 07 Nov 2023 13:06:21 -0800 (PST) To: tarantool-patches@dev.tarantool.org, sergeyb@tarantool.org, skaplun@tarantool.org, m.kokryashkin@tarantool.org Cc: Maksim Kokryashkin Date: Wed, 8 Nov 2023 00:06:14 +0300 Message-Id: <20231107210616.53138-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/2] gc: handle errors in finalizers 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" Changes in v2: - Fixed comments as per review by Sergey Kaplun. See my answers in the corresponding patch. V1: https://lists.tarantool.org/tarantool-patches/20231027125738.29527-1-max.kokryashkin@gmail.com/T/#t Branch: https://github.com/tarantool/luajit/tree/fckxorg/lj-946-print-errors-from-gc-fin PR: https://github.com/tarantool/tarantool/pull/9315 Issues: https://github.com/LuaJIT/LuaJIT/pull/946 https://github.com/LuaJIT/LuaJIT/issues/991 https://github.com/tarantool/tarantool/issues/9145 Mike Pall (2): Print errors from __gc finalizers instead of rethrowing them. Fix last commit. src/Makefile.dep.original | 14 +++---- src/lib_aux.c | 35 +++++++++++++++- src/lj_gc.c | 10 ++++- src/lj_vmevent.h | 7 ++-- test/PUC-Rio-Lua-5.1-tests/gc.lua | 12 +++--- ...91-fix-finalizer-error-handler-init.test.c | 30 +++++++++++++ ...6-print-errors-from-gc-fin-custom.test.lua | 42 +++++++++++++++++++ ...-print-errors-from-gc-fin-default.test.lua | 11 +++++ .../script.lua | 24 +++++++++++ 9 files changed, 165 insertions(+), 20 deletions(-) create mode 100644 test/tarantool-c-tests/lj-991-fix-finalizer-error-handler-init.test.c create mode 100644 test/tarantool-tests/lj-946-print-errors-from-gc-fin-custom.test.lua create mode 100644 test/tarantool-tests/lj-946-print-errors-from-gc-fin-default.test.lua create mode 100644 test/tarantool-tests/lj-946-print-errors-from-gc-fin-default/script.lua -- 2.39.3 (Apple Git-145)