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 891304124A7; Thu, 22 Jun 2023 17:33:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 891304124A7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1687444418; bh=3kJEsv9qP837E+J+G0qjKX4JeuwvOcpq7+dvkSRvovU=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=QRsVO+CAe4CcaGVvv3mqQ1r15i+yvcsG9ROT9JjZaucwqOS/kaflju2I9sio9JMQl 7EwxaQRdeNhXeq7QJSC6BHJ4B/w7bB50CVQOuia1oipJ/AeYxXm55iINzcn3nN+90Z Nui6XENyWso2U9z391Z6WupGy0x58J7rfP1qFhfQ= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 528E34124A7 for ; Thu, 22 Jun 2023 17:33:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 528E34124A7 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1qCLNQ-00053t-8q; Thu, 22 Jun 2023 17:33:36 +0300 To: Igor Munkin , Maxim Kokryashkin Date: Thu, 22 Jun 2023 17:29:17 +0300 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD95D99986233CC4DDC5BACE53C59198470BA2B0E86AC3ED26E182A05F538085040B645C7D0C3D08A4F42CF217E358B8A99445AD02D2393B3CCA4069CD831AE2473 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7544B1CCE26E01C74EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378556F4CD9D953FFE8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D82F525AB75C7788F6B13F3B8AC2C4467C117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC8C7ADC89C2F0B2A5A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520C24E1E72F37C03A0BDFBBEFFF4125B51D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6300D3B61E77C8D3B089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5DF45CE4C80F7F3C371B531DF90B25EEB1E7BE3D3E3FA1EE8F87CCE6106E1FC07E67D4AC08A07B9B064E7220B7C5505929C5DF10A05D560A950611B66E3DA6D700B0A020F03D25A0997E3FB2386030E77 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF77DD89D51EBB7742D3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF650A3296CA7AD9D00A6BD56B641473DA85F9FCE90446742762365D9AB6C590233066587AC4ADAE82B05B57073EAFDF972F7B6B5E3CC38D9A6050A1872827AE7FA74DFFEFA5DC0E7F02C26D483E81D6BE5EF9655DD6DEA7D65774BB76CC95456EEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXiT4M+mfjJrkDW/vv1c2tWy X-DA7885C5: C9CDC108EA45BFBA6B43AC959B5F253997586D7BE118C66A4E8327DA429B401A262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73930F533AC2B33E986B5E2228EDEC1A313B890B9B2F3B24200F0FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit 0/2] Fix lua_yield from the C hook. 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: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This patchset fixes the behaviour of the `lua_yield()` invocation inside C hooks. The first patch fixes the behaviour for non-GC64 mode, but the GC64 mode is still failing with a core dump. The second patch fixes behaviour for the GC64 mode as well. This patchset is based on the our C tests to be introduced, but their patch set has 2 LGTMs, so I just checkout this branch from the branch with C tests. PR: https://github.com/tarantool/tarantool/pull/8804 Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-yield-c-hook Related issue: https://github.com/tarantool/tarantool/issues/8516 Mail list: https://www.freelists.org/post/luajit/BUG-Unable-to-yield-in-a-debug-hook-in-latest-21-beta Mike Pall (2): Fix lua_yield() from C hook. Another fix for lua_yield() from C hook. src/lj_api.c | 5 +- src/lj_ccallback.c | 2 +- src/lj_err.c | 2 +- src/lj_frame.h | 2 +- src/lj_meta.c | 2 +- .../fix-yield-c-hook-script.lua | 19 +++++++ .../tarantool-c-tests/fix-yield-c-hook.test.c | 49 +++++++++++++++++++ 7 files changed, 75 insertions(+), 6 deletions(-) create mode 100644 test/tarantool-c-tests/fix-yield-c-hook-script.lua create mode 100644 test/tarantool-c-tests/fix-yield-c-hook.test.c -- 2.34.1