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 DDB08B9377E; Thu, 16 May 2024 13:18:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DDB08B9377E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1715854709; bh=GomuFW1LkPNA7OZNASijly0x4ako6m2M/Mugs6KNlIg=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=sPDc+yFDcVehir+ocOHLy3B/El5by+33NLXa9AMzuUr8xm8Zw7jH7p8cpB0rN0ToC cxyI+zBbL5YNlkVh8tR/m5GIsvmooz4c7w1LIEUZ6o/wkWPJ5cpG7pqeEO9+le+Clh JWUflAcYFO6nggiLEh3joQoSR7Q8mYuxFwuQI1tQ= Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [95.163.41.68]) (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 06C545C2EE1 for ; Thu, 16 May 2024 13:18:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 06C545C2EE1 Received: by smtp29.i.mail.ru with esmtpa (envelope-from ) id 1s7YBu-0000000HPiQ-10Ni; Thu, 16 May 2024 13:18:26 +0300 Date: Thu, 16 May 2024 13:14:14 +0300 To: Maxim Kokryashkin , Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Message-ID: References: <6f8a08e1823bfceebb4057207ee2f2bdb7d2d47c.1715776117.git.skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6f8a08e1823bfceebb4057207ee2f2bdb7d2d47c.1715776117.git.skaplun@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD947734D04B31285445A62824FAFBF3A55388E0B11441591BC00894C459B0CD1B9A89EDE9A18AD73A52957D43778006DA9623B5DD51FDB70175205144E4A166437A43962510F43F2FA X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7832AD58179B12F4FEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063725FA9CD6081C82518638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8EB5A40DF07B966C2A9AA0B5BA5DADBF6EF5308AA79812B23CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F3E38EE449E3E2AE389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8062BEEFFB5F8EA3EF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B851EDB9C5A93305EEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A5006BD2CBFA56CBD95002B1117B3ED696ED39C3172068D820B2920F75BA9A967F823CB91A9FED034534781492E4B8EEAD9DB614F8F96CFA30BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34524B2D44961BF9C633111C309E0CC7E7E990656EF265C43040A4EFB7EF7AF1ED3A083D9E07B8F0DB1D7E09C32AA3244C2CFE159F2A31D41F13EA5626864FADBF1F5655CDCECC1E5BEA455F16B58544A2557BDE0DD54B3590A5AE236DF995FB59829709634694AABAED6A17656DB59BCAD427812AF56FC65B X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojyXdl6hFIhShGfMlYLfy5Dw== X-DA7885C5: 0FAE5BA882933208F255D290C0D534F9117FAF02B03A27D647BF2C14943842028E390C71E0D2E8465B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393C6D0B12EA33CAA9B2365DBA356D0735510A57C7A63AADD3FA9C4F8EC040982CAE49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 1/2] build: introduce LUAJIT_USE_UBSAN option 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, folks! Some more thoughts below. On 15.05.24, Sergey Kaplun wrote: > + string(JOIN "," UBSAN_IGNORE_OPTIONS > + # Misaligned pseudo-pointers are used to determine internal > + # variable names inside the `for` cycle. > + alignment > + # Not interested in float cast overflow errors. > + float-cast-overflow > + # NULL checking is disabled because this is not a UB and > + # raises lots of false-positive fails. > + null Maybe it is worth to add also "nonnull-attribute" to the ignore options: ``` LSAN_OPTIONS="abort_on_error=1" src/luajit -e 'error("bad usage", 3)' /home/burii/builds_workspace/luajit/gh-8473-ubsan/src/lj_buf.h:75:25: runtime error: null pointer passed as argument 1, which is declared to never be null /usr/include/string.h:44:28: note: nonnull attribute specified here ``` Here, `memcpy()` gets the NULL pointer as the first argument and the `len` == 0. So there are no problems here. Also, the nullability violation is not a UB, as mentioned in the documentation. Thoughts? > + # Not interested in checking arithmetic with NULL. > + pointer-overflow > + # Shifts of negative numbers are widely used in parsing ULEB, > + # cdata arithmetic, vmevent hash calculation, etc. > + shift-base > + ) -- Best regards, Sergey Kaplun