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 56FB5D1225C; Thu, 20 Jun 2024 13:07:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 56FB5D1225C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1718878045; bh=3XNLoHFH+U8P5QXBPwKsBYo3FAoI5rKL0CdIif2TJ+o=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=gvCtDsCwyCq6/6uGgNrD3eJZuPvl6rNhCXZeo2xqMB1T9X0qbIv8jAHZgbiDx0Nv4 sATSg2Jfp7s3M/BznveY6WmvnVeqyBKhHAUmiQWy0A4CFYnEv0QBKuDKgWlBO8AKH7 3IBZwjlwMKLi04WeN7HJweU3df3U0lMpoWyG4goE= Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [95.163.41.86]) (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 D0338D1225C for ; Thu, 20 Jun 2024 13:07:24 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D0338D1225C Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1sKEhP-0000000Ae0C-1oho; Thu, 20 Jun 2024 13:07:23 +0300 Date: Thu, 20 Jun 2024 13:03:10 +0300 To: Sergey Bronnikov 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: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9EB52AADBDB11C14927CFFAF1C6212F6AB55D068E3B3A9FE4182A05F53808504060F0D67046CE9D4DC591814E25D11F9F29BC117F0E64C7136E331B9BC7309C84522A44AD59F264DF X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7E1F5C7CA1DBFB751EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637603D0B7FC8E46DFC8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D863FB0AA3A7AAD5A47F054C1493660450F224D385B6881C00CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F3E38EE449E3E2AE389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8A9FF340AA05FB58CF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F7900637F09814068C508CC822CA9DD8327EE4930A3850AC1BE2E735D2D576BCF940C736C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A5C8CA857562CEE0EA5002B1117B3ED6960F9A55E95667A4939E040399BDE4761E823CB91A9FED034534781492E4B8EEAD09122B91796FF21FBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D345DB600F8E858000FBE431158DBD8B7D70C0A0232B934E99CA7EEBBF7C75D12521740E390CC9C0CC71D7E09C32AA3244CCB7BDB51B8FEFCB4EBBA027F22CEDE66556C8E1D1C5F8627EA455F16B58544A2557BDE0DD54B3590A5AE236DF995FB59829709634694AABAED6A17656DB59BCAD427812AF56FC65B X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojstWfowt7DqJ0xyruWuoRsg== X-DA7885C5: B47F563277BF57DBF255D290C0D534F975DF4ACD60DE0542126CD915AA1493E0FD9986102048F53F5B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393C6D0B12EA33CAA9B65D6053BF29E27B567168D52CF4D722280F1158956C3C294E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F 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 Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the reply! On 20.06.24, Sergey Bronnikov wrote: > Hi, Sergey, > > On 16.05.2024 13:14, Sergey Kaplun wrote: > > 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? > > I agree with arguments provided by Maxim - it's UB, the standard states > it clearly, > > and it should be fixed. I propose to do the following: > > - suppress the check (add it to UBSAN_IGNORE_OPTIONS) with appropriate > comment > > (something like "we know it is bad, but it is unfixed in upstream, we > will wait a fix"). > > Probably we should suppress it per file like you did with other checks. I suppress this particular failure inline, like for other checks. Should I add the test for it? > > - send a fix to upstream or submit an issue to the upstream (I'll not > insist, but it would be desirable) I suppose this issue will be marked as won't fix or invalid. Feel free to submit the ticket if you want. > > > > >> + ) -- Best regards, Sergey Kaplun