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 D8EA06687CD; Fri, 20 Oct 2023 16:17:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D8EA06687CD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1697807867; bh=Mzw2LL081sauIZ2MbNrqwffmxbvahqWmYJAcoxETBu4=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=A/qjDgqL565XUzf954l7wvBA/OOrgGqCmjS8NiskSObhOwyG+VUcgafYbUZv+qoEh uLKjsVBqk3YtUc3eSCFqECzgYAVeIhypfAfBM0FS8lLlQzRp967OGaJu3ZeGevon0n 5Mi1ZrcT0UBMw9ELkYsElNsFcxKnVW2UPtjdingE= Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (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 CA76A656C30 for ; Fri, 20 Oct 2023 16:17:44 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CA76A656C30 Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-9adca291f99so123401166b.2 for ; Fri, 20 Oct 2023 06:17:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697807864; x=1698412664; 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=wThZvTaGEZyvMRfjhpWqKJsp4yk4p3SLk9SB3+4znwQ=; b=bjVjumDOqnjxynRugi7239UVRNf9L3PgxV7X35DkecT8q5IRs2ql7AKeQzLJ4fn0IC IFAM0MXpNWX4KMV6EvhxFqno8asDIkWZ7LkJg+I6vwz2V2FujBtjSovC2IeqDH7Oj/AP jG+GrmCwKv7LC21tCD7cZPiTAMDJzhBq3hiKzwhQVhFtHo+PbMziSprv4FGYni/YcXGt uMi/l3C7W3bpQhVsTjEjxCTYFPfHT6f4OadasWZuciA/G4BfEb4RanDjoDOebqm8WyYf 5voJEE2lgiK7KbUVC6S5D+BSKN/iTuGX/JNc3UvpxrR7zKxCLGIdsc8e+LnyRRjos0O2 NS+w== X-Gm-Message-State: AOJu0YwYIMjUxbFbzT9JSG684TgWZUtZinaH0MoJFnhFwYOXMRqM9ts4 s6DaloOVSe3Prt+j5TzJXovHZDn1OLqJpA== X-Google-Smtp-Source: AGHT+IHVRcN8VuGa3Pt13/AevMzopdosJhckdn8miNSpt32SO3OUzTsk468MtIWn7zsv3R5CVkz2LQ== X-Received: by 2002:a17:907:d8d:b0:9b2:df16:851d with SMTP id go13-20020a1709070d8d00b009b2df16851dmr1405364ejc.57.1697807863528; Fri, 20 Oct 2023 06:17:43 -0700 (PDT) Received: from pony.. ([185.6.247.97]) by smtp.gmail.com with ESMTPSA id qh12-20020a170906ecac00b009b9af27d98csm1478598ejb.132.2023.10.20.06.17.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 06:17:42 -0700 (PDT) To: tarantool-patches@dev.tarantool.org, Sergey Kaplun , max.kokryashkin@gmail.com, Igor Munkin Date: Fri, 20 Oct 2023 16:17:19 +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][v3] 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 Epic: https://github.com/tarantool/tarantool/pull/9145 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/ Patches v2: https://lists.tarantool.org/tarantool-patches/cover.1693480177.git.sergeyb@tarantool.org/T/#t Changes v3: - removed fio helpers - build shared library by CMake 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 | 111 ++++++++++++++++++ test/tarantool-tests/CMakeLists.txt | 1 + .../lj-549-bytecode-loader.test.lua | 27 +++++ .../lj-549-bytecode-loader/CMakeLists.txt | 20 ++++ .../lj-549-bytecode-loader/script.lua | 3 + 9 files changed, 177 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 create mode 100644 test/tarantool-tests/lj-549-bytecode-loader/CMakeLists.txt create mode 100644 test/tarantool-tests/lj-549-bytecode-loader/script.lua -- 2.34.1