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 91806D79546; Tue, 25 Jun 2024 18:54:32 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 91806D79546 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1719330872; bh=lXnva62wSfyDAALvKj+5a3+71PZD6gmUR/w0F1AyQfc=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=h3rtAWgYkVLl4u7UzPj/y9UZaTg9pelugRn1HWh5eAhtD4XUYqco/MlVKXGi1DO5B /VPx8RWJsxUB+Ttlu6bPwyhdhbGliOgs1ZH18sq7GC8OFZkKnYkyqAAv3h9xmFgFve xvsnr/kZDyQDjkj/RD58FNhXPlw6duElSCqm9HzA= Received: from smtp16.i.mail.ru (smtp16.i.mail.ru [95.163.41.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 AB152547367 for ; Tue, 25 Jun 2024 18:54:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AB152547367 Received: by exim-smtp-84f7fbf7d8-xws4d with esmtpa (envelope-from ) id 1sM8V3-00000000Jpy-29dX; Tue, 25 Jun 2024 18:54:29 +0300 To: Maxim Kokryashkin , Sergey Bronnikov Date: Tue, 25 Jun 2024 18:54:23 +0300 Message-ID: X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD97FB297CCB910C1A970AAD3ED20BCF79234875F5E670CA806182A05F538085040B45C6CF63200C3DB3DE06ABAFEAF670590D31C4580B5FFF50423AD6A72E2DA528B806FB6556597BD X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7C6068CE86C2B75F5EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063749A0D61DF1984B008638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D88CF3A59AD214F69F47D85B89C5F979B076DB4E104F50881FCC7F00164DA146DAFE8445B8C89999728AA50765F790063741F7343E26298569389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC80CABCCA60F52D7EBF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE33AC447995A7AD182BEBFE083D3B9BA73A03B725D353964BD2DCF9CF1F528DBC35872C767BF85DA227C277FBC8AE2E8BDCE939D40DBB93CA75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A510C0DDD2AA6D98DE5002B1117B3ED6960EC5B84DA7AA9475886DC9BC01168B20823CB91A9FED034534781492E4B8EEADEF0AF71940E62277C79554A2A72441328621D336A7BC284946AD531847A6065AED8438A78DFE0A9EBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF77DD89D51EBB7742D3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFE7BE8019FA0F4F525A8B91D484BB3B4B7D7CD25A5A15FDC0C6A869AD8932FA773066587AC4ADAE82443676941C84C1C8BA2943472F5A624583B225F5EA95193937064A2B7DE1B697C226CC413062362A913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXgyByZ8VJ+huf7SwJORtimj X-DA7885C5: 732E43B5FCA85920F255D290C0D534F92D51BCFED953FEE6A15089620505211EA3720609342A500C5B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393C6D0B12EA33CAA9BFF984A5AF5865E5B351A3AB009AB45A538D6BE03195B1004E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit 0/2] Fix UBSan warnings 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 removes all UBSan suppressions (except one in lj_opt_fold.c regarding integer overflow and lj_buf.h regarding NULL ptr argument) by fixing all known issues. The first patch fixes out-of-bounds access to the `ex->gpr` structure during snapshot restore. The second patch fixes all possible negations of INT*_MIN. Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-928-1193-sanitizer-fixes Related issues: * https://github.com/LuaJIT/LuaJIT/issues/928 * https://github.com/LuaJIT/LuaJIT/issues/1193 * https://github.com/tarantool/tarantool/issues/9924 * https://github.com/tarantool/tarantool/issues/8473 Mike Pall (2): Prevent sanitizer warning in snap_restoredata(). Avoid negation of signed integers in C that may hold INT*_MIN. src/lib_base.c | 2 +- src/lib_bit.c | 3 +- src/lj_asm_mips.h | 2 +- src/lj_carith.c | 7 +- src/lj_cparse.c | 2 +- src/lj_crecord.c | 3 +- src/lj_ctype.c | 2 +- src/lj_emit_arm.h | 2 +- src/lj_emit_arm64.h | 9 +- src/lj_obj.h | 2 +- src/lj_opt_fold.c | 6 +- src/lj_parse.c | 17 +-- src/lj_snap.c | 13 +- src/lj_strfmt.c | 9 +- src/lj_strscan.c | 26 ++-- src/lj_vmmath.c | 6 +- ...93-out-of-bounds-snap-restoredata.test.lua | 28 ++++ .../lj-928-int-min-negation.test.lua | 121 ++++++++++++++++++ 18 files changed, 196 insertions(+), 64 deletions(-) create mode 100644 test/tarantool-tests/lj-1193-out-of-bounds-snap-restoredata.test.lua create mode 100644 test/tarantool-tests/lj-928-int-min-negation.test.lua -- 2.45.1