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 451FA539166; Fri, 29 Sep 2023 09:21:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 451FA539166 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1695968483; bh=Wb6F3gqMPqOninvZYFOLXVu0bgB5XyFN5MJ3lmdxexY=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Cz0YaxcNWvJxbppa8aBgcb0jgWyzrj01x3rSUUUqtsFeAEQoVvAs6v+H4S4PTYeVF xXdFK6RXydH3elE2Kkps3cj+2vZlxNiqSLBQMoHvVjUw4Wb49qjvhnCop/D/tfOIFz Ca/x9QNGX2WW0HPrUvfy6UbaZzTTd0W9VgaOopvI= Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (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 C406B539166 for ; Fri, 29 Sep 2023 09:20:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C406B539166 Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-50325ce89e9so22488618e87.0 for ; Thu, 28 Sep 2023 23:20:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695968425; x=1696573225; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TslL25+C4ammFhfLtI4q6ov0oiCxGUoBYh7k02THEuc=; b=Zd7WdssBZyK83lm+bz+2ktlnaitodCXIiWvpUqWuQcLFfGD8CZD5Ka5Nn2RvSkzOfN vSuy8oVhuzqTPF2BmtZQ1YahhiAEi1f+By5L3eQAdEZhmFK2skvO+1gVJCgA8HjBDlBJ futUkSwxdZskiuRYuSR9VNDNpKBvbDpJHVEzAJ3RhxlqTIdTGZGhFfqNoyp9JOn+/+ZT 4H/7B03f99WqO+CZqu8YlieJNGvmdAuUK80C2TcyIvMLeQmA3CQk0+TWTegcK9lindh7 ntjcvoMNqz8ZzTSXpmcgNVLuCfKMc6QFS41Bhfj/ijvkR7gGI0pssaed2sMH7YAPS92c aTwA== X-Gm-Message-State: AOJu0YxlKpUvXax1tmRWJR8/bH4le3LCuReG2B/IuqgCpKk3o6d8qOcF qw9UfNk8lo9A0BP8/n3uylQrTttwCSM= X-Google-Smtp-Source: AGHT+IGTi7prihsf8/fw6gadlmc6WcUl8oyjO3aAdC8qmmcXP1mnsV/6XrkKaAGqfvWffNw9FP3bqQ== X-Received: by 2002:a05:6512:1391:b0:500:9a45:63b with SMTP id fc17-20020a056512139100b005009a45063bmr3324119lfb.13.1695968424593; Thu, 28 Sep 2023 23:20:24 -0700 (PDT) Received: from localhost.localdomain ([93.175.28.59]) by smtp.gmail.com with ESMTPSA id c14-20020a056512238e00b0050485bad4b4sm917717lfv.222.2023.09.28.23.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 23:20:24 -0700 (PDT) X-Google-Original-From: Maxim Kokryashkin To: tarantool-patches@dev.tarantool.org, skaplun@tarantool.org, sergeyb@tarantool.org Date: Fri, 29 Sep 2023 09:20:11 +0300 Message-ID: <962014531f23bc9fdad79fbf9b7064a75a6a6c5d.1695968227.git.m.kokryashkin@tarantool.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit v2 2/5] Revert "Update cur_L on exceptional path" 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 reverts commit ed412cd9f55fe87fd32a69c86e1732690fc5c1b0. As was mentioned in tarantool/tarantool#6189, throwing an error not on the currently executed coroutine is a violation of the Lua/C API. This patch is a part of the patchset that supports this violation and is reverted because of it. Part of tarantool/tarantool#6323 --- src/vm_x64.dasc | 1 - src/vm_x86.dasc | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/vm_x64.dasc b/src/vm_x64.dasc index 116716ac..399dfcbf 100644 --- a/src/vm_x64.dasc +++ b/src/vm_x64.dasc @@ -535,7 +535,6 @@ static void build_subroutines(BuildCtx *ctx) |->vm_unwind_c_eh: // Landing pad for external unwinder. | mov L:RB, SAVE_L | mov GL:RB, L:RB->glref - | mov [GL:RB->cur_L], L:RB | mov dword GL:RB->vmstate, ~LJ_VMST_CFUNC | mov DISPATCH, GL:RB // Setup pointer to dispatch table. | add DISPATCH, GG_G2DISP diff --git a/src/vm_x86.dasc b/src/vm_x86.dasc index e3fbf751..9fa9a3f7 100644 --- a/src/vm_x86.dasc +++ b/src/vm_x86.dasc @@ -683,7 +683,6 @@ static void build_subroutines(BuildCtx *ctx) |->vm_unwind_c_eh: // Landing pad for external unwinder. | mov L:RB, SAVE_L | mov GL:RB, L:RB->glref - | mov dword GL:RB->cur_L, L:RB | mov dword GL:RB->vmstate, ~LJ_VMST_CFUNC | mov DISPATCH, GL:RB // Setup pointer to dispatch table. | add DISPATCH, GG_G2DISP @@ -719,7 +718,6 @@ static void build_subroutines(BuildCtx *ctx) | add DISPATCH, GG_G2DISP | mov PC, [BASE-4] // Fetch PC of previous frame. | mov dword [BASE-4], LJ_TFALSE // Prepend false to error message. - | mov [DISPATCH+DISPATCH_GL(cur_L)], L:RB | // INTERP until jump to BC_RET* or return to C. | set_vmstate INTERP | jmp ->vm_returnc // Increments RD/MULTRES and returns. -- 2.42.0