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 2953D5CE0F9; Thu, 31 Aug 2023 14:30:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2953D5CE0F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1693481423; bh=7pTmsVSz4jDRQALXHOioYpZ3jMp8ZzZR16rLK4krWDo=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=dP1ca7RAgjjaCYrMdegzTuHNDbfx/z1nEhqKEdNWUMQU1TeUSi6SWctIDYo+CKCe6 debIo4CFi1voDKv60OQMyALjhKuZWa5rygH32ZgISRml+T8279YhUQQzEuXhQiuer5 a6gAsokx3OD9jSy4fHPOV1eu6nrnh3B08MKC1E40= Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 650245BCFDE for ; Thu, 31 Aug 2023 14:30:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 650245BCFDE Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-500913779f5so1397123e87.2 for ; Thu, 31 Aug 2023 04:30:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693481421; x=1694086221; 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=MM+RkaSOC68o2EJ6zvYY/5KB4Ao2IPtraLjrAYX93Mk=; b=hK1/YQE4he40o07GfLw8eXpwNcZni+MvlXM6LAYek03oOi7+DT1kwBM7JILuh6oxcO h7RIHGbAJy9pqbHF76YZA7GPLX3dxrgFrlXp2P8vdGFmrMh3XEE1FqMfJvEguErThXt/ Ee59xQXD0xYYtlOAJvZ4Oi7wSroeJfE1gvs4VCWEYPqgSqE2cJ3rjkF1G6yCoMRDuQbs ymvCoWvxjA5fjn9Wrr+p9P/ex93XSReL+5ySDXDPDektCzDNGkcd4rGAGxMcsCIMaGe1 qKQyTD6OvH4Dl6LeI6a+aQwM/lzY7qkOhf4Q1igVH1DoNMC5eug38L8DELJIysdabQFU 919Q== X-Gm-Message-State: AOJu0YwefJHsUZa3wwwEpWtDWxy6YWhmVR9YS6UmU9q1bv6bZnwyMTgx d1XKk8YJouVFA0e30JfXaYWMfQTxDHc= X-Google-Smtp-Source: AGHT+IG6DgWXWSs1hXsoSR5NLAvRU6kKuLHNefjuWu+R8x3zNgT8qs7Ul30NDMCeHkuTxrFPza9k7g== X-Received: by 2002:a05:6512:3196:b0:4fe:2f8a:457e with SMTP id i22-20020a056512319600b004fe2f8a457emr4231695lfe.43.1693481421291; Thu, 31 Aug 2023 04:30:21 -0700 (PDT) Received: from pony.. ([185.6.247.97]) by smtp.gmail.com with ESMTPSA id m7-20020aa7c2c7000000b00523a43f9b1dsm683917edp.22.2023.08.31.04.29.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 04:29:41 -0700 (PDT) To: tarantool-patches@dev.tarantool.org, Sergey Kaplun , max.kokryashkin@gmail.com Date: Thu, 31 Aug 2023 14:29:31 +0300 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit 0/2][v2] Fix embedded bytecode loader 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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Sergey Bronnikov Tarantool PR: https://github.com/tarantool/tarantool/pull/8913 Related issue: https://github.com/LuaJIT/LuaJIT/issues/549 Branch: https://github.com/tarantool/luajit/tree/ligurio/lj-549-fix-embedded-bytecode-loader Patches v1: https://lists.tarantool.org/tarantool-patches/cover.1690300762.git.sergeyb@tarantool.org/ Changes v2: - added a Lua test that reproduces a problem like reproducer do - added fixes according to comments from Maxim K. and Sergey K. Mike Pall (2): Fix embedded bytecode loader. Followup fix for embedded bytecode loader. src/lib_package.c | 4 +- src/lj_bcread.c | 10 +- src/lj_lex.c | 7 + src/lj_lex.h | 1 + test/tarantool-c-tests/lj-549-lua_load.test.c | 134 ++++++++++++++++++ .../lj-549-bytecode-loader.test.lua | 96 +++++++++++++ 6 files changed, 245 insertions(+), 7 deletions(-) create mode 100644 test/tarantool-c-tests/lj-549-lua_load.test.c create mode 100644 test/tarantool-tests/lj-549-bytecode-loader.test.lua -- 2.34.1