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 4B8876EC55; Tue, 4 May 2021 11:51:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4B8876EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1620118272; bh=6ne+g2Cjty7lLm5ROwlRif8wsS2K3YYgZE+aMhet7Wg=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=tMRyBcCR9bc9vppDYvs0WgGZIDClrvTFNXXVAlaXfNraVwAo1hpR4i7oYkjqSCIHp trQhRlXemREyRyBG5U0pOLuMXlkZcbOTitWEt5iScNoDpqogWy4YYiPla2cScpJ8hd M8oQu9JS7wf6VpYxvkHZXgKXsBeucaM/7kyAbjdw= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 12EB76EC55 for ; Tue, 4 May 2021 11:51:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 12EB76EC55 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1ldqlp-0006nn-Fr; Tue, 04 May 2021 11:51:09 +0300 To: Sergey Ostanevich , Sergey Kaplun Date: Tue, 4 May 2021 11:29:58 +0300 Message-Id: <72c91a259dd039fc95961992ae06baee820695be.1620072340.git.imun@tarantool.org> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD95978C26455E69BE0B2C7F7C3B0039F139F0EF8E3717E163C182A05F538085040153AB4E982F6F939B888A3D33D18801C33928CD644D46015824711C945BE8A1B X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F4E79F226F99D4DDEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637D51A55327EA515C2EA1F7E6F0F101C67CDEEF6D7F21E0D1D9295C2E9FA3191EE1B59CA4C82EFA6589C09E20A2E10461AAC79BCBE2CBFC2CBF6B57BC7E64490618DEB871D839B73339E8FC8737B5C2249E5E764EB5D94DBD4CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C07734D68A6916D8318941B15DA834481F9449624AB7ADAF372E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C36174550A02D153F535872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CD01D125F202A26CB2B1AE73CE6CD0890A652CD3F2D0539149C2B6934AE262D3EE7EAB7254005DCED6BB2BF071322A0961E0A4E2319210D9B64D260DF9561598F01A9E91200F654B02DA3D96DA0CEF5C48E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D347215713CF3EEE9D1B97D0A1EEBAD1DF7ACAB10011832AD7FF34B566FCFDA672551AE07D69257A96D1D7E09C32AA3244C3F5A14ACE246DBE5602F0F1C1331C1723A76366E8A9DE7CA927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojPfcCWXFGimWbP+7kKRbkYg== X-Mailru-Sender: 689FA8AB762F73936BC43F508A0638225BE55A69F4A2B33A197B0C822C75571DA7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH] build: add missing module for jit.dump on ARM64 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Since commit c9d88d5f48054d78727b587fef7567422cdc39a6 ('Fix #984: add jit.* library to the binary') all required modules implemented in Lua are bundled (i.e. compiled into the executable as a C literal) into Tarantool binary. While making Tarantool work on ARM64 platforms, it turned out the arch-specific module (namely, jit/dis_arm64.lua) is not bundled. Within this patch the missing sources are added and jit.dump loads fine on ARM64 hosts as a result. Part of #5983 Relates to #5629 Follows up #984 Signed-off-by: Igor Munkin --- Branch: https://github.com/tarantool/tarantool/tree/imun/gh-5983-add-jit-dump-on-arm64 Issue: https://github.com/tarantool/tarantool/issues/5983 CI looks to be OK[1] except the known problems with ASAN[2]. [1]: https://github.com/tarantool/tarantool/commit/be184b2 [2]: https://github.com/tarantool/tarantool/issues/6031 src/CMakeLists.txt | 1 + src/lua/init.c | 2 ++ .../gh-5983-jit-library-smoke-tests.test.lua | 14 ++++++++++++++ 3 files changed, 17 insertions(+) create mode 100755 test/app-tap/gh-5983-jit-library-smoke-tests.test.lua diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9005a37d6..f7a776986 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -54,6 +54,7 @@ lua_source(lua_sources lua/swim.lua) # LuaJIT jit.* library lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/src/jit/bc.lua) lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/src/jit/bcsave.lua) +lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/src/jit/dis_arm64.lua) lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/src/jit/dis_x86.lua) lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/src/jit/dis_x64.lua) lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/src/jit/dump.lua) diff --git a/src/lua/init.c b/src/lua/init.c index 3358b7136..dfae4afb7 100644 --- a/src/lua/init.c +++ b/src/lua/init.c @@ -106,6 +106,7 @@ extern char strict_lua[], vmdef_lua[], bc_lua[], bcsave_lua[], + dis_arm64_lua[], dis_x86_lua[], dis_x64_lua[], dump_lua[], @@ -167,6 +168,7 @@ static const char *lua_modules[] = { "jit.vmdef", vmdef_lua, "jit.bc", bc_lua, "jit.bcsave", bcsave_lua, + "jit.dis_arm64", dis_arm64_lua, "jit.dis_x86", dis_x86_lua, "jit.dis_x64", dis_x64_lua, "jit.dump", dump_lua, diff --git a/test/app-tap/gh-5983-jit-library-smoke-tests.test.lua b/test/app-tap/gh-5983-jit-library-smoke-tests.test.lua new file mode 100755 index 000000000..ab42fbebf --- /dev/null +++ b/test/app-tap/gh-5983-jit-library-smoke-tests.test.lua @@ -0,0 +1,14 @@ +#!/usr/bin/env tarantool + +local tap = require('tap') + +local test = tap.test('gh-5983-jit-library-smoke-tests') +test:plan(1) + +-- Just check whether all Lua sources related to jit.dump are +-- bundled to the binary. Otherwise, loading jit.dump module +-- raises an error that is handled via and passed as a +-- second argument to the assertion. +test:ok(pcall(require, 'jit.dump')) + +os.exit(test:check() and 0 or 1) -- 2.25.0