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 D26F85082B7; Thu, 13 Jul 2023 11:02:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D26F85082B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1689235343; bh=SaDN2gxz6eCCFe0kNu4oRfGuUEzvRTlRZUfBI8fhvPk=; 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=IDQL7ZaUPKZcrmsVkhSIRkmXRWfReANXrQaWcNqItUE9DylrbDJegwmiR+RkDvFkA JoPrBwKTy++j9w81/RfdaxhbX9smwq/7JQ+hJP264n6ezcfJxpsdbI+8ZD+BYCk6eh Go8HFHuJpfcWnlN5hFvN+YuuGsUHuIViwkrcIQqk= Received: from smtp53.i.mail.ru (smtp53.i.mail.ru [95.163.41.90]) (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 026E05082B7 for ; Thu, 13 Jul 2023 11:02:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 026E05082B7 Received: by smtp53.i.mail.ru with esmtpa (envelope-from ) id 1qJrHJ-008fjr-2k; Thu, 13 Jul 2023 11:02:21 +0300 Date: Thu, 13 Jul 2023 10:57:59 +0300 To: Sergey Bronnikov Message-ID: References: <895991f2-93ca-0901-031b-2b39e0612a39@tarantool.org> <61340557-2a53-e6e3-ac6f-280ff30f1d66@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <61340557-2a53-e6e3-ac6f-280ff30f1d66@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9B2A9E02D3479B2E06768B938AD40B0B2F406FBBAB3BE9D72182A05F538085040A1E78D7B8432221B01B9610C4A15B18AF9AAA9925E119EAE9F2531095DBA3DB7 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE75263010198C72082EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063719513F03911326708638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D873EF738AAB75AD6AA8371D1150A298B6117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC974A882099E279BDA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520C65AC60A1F0286FE28451B159A507268D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE0AC5B80A05675ACDB2D370F7B14D4BC4D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE34B6F6234D9065C979735652A29929C6CC4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637BBEA499411984DA1EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A552D2C6AA91010799B11881DD7714098A7ECCF1D4C929BCE6F87CCE6106E1FC07E67D4AC08A07B9B06A1CB4668A9CA5FACB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF9CCC15D72D604BD51171C977414FB7083B03BB92F0375ADFFAA47A50C0D891ED35D9E4C97941E9B1399DF444199BC1D1DD570E8160FD591DB1BBB835A068BEDCA74DFFEFA5DC0E7F02C26D483E81D6BE5EF9655DD6DEA7D65774BB76CC95456EEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojmIyQFW4pVckDSBmgSP93fw== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A7698D1208142536079101B9610C4A15B18A1AB5AE572836FD89DEDBA653FF35249392D99EB8CC7091A70E183A470755BFD208F19895AA18418972D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v1] Fix BC_UCLO insertion for returns. 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: Sergey Bronnikov , tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the fixes! Still some thoughts about the `pcall()`. On 10.07.23, Sergey Bronnikov wrote: > Hi, Sergey! > > > thanks for review! > > > On 7/9/23 16:15, Sergey Kaplun wrote: > > Hi, Sergey! > > Thanks for the fixes! > > LGTM, except a few nits and rewordings below. > > > @@ -110,6 +114,7 @@ f() >  f = missing_uclo() >  local _ >  _, res = pcall(f) > -test:ok(type(res) == 'function', 'consistency on compilation: type of > returned value is correct') > +test:ok(type(res) == 'function', > +        'consistency on compilation: type of returned value is correct') > >  os.exit(test:check() and 0 or 1) > > > Do we need pcall here? > > > I would use it to avoid breaking test due to assert. > > Without a pcall: > > > TAP version 13 > 1..2 > not ok - VM consistency: type of returned value is correct >     filename:   eval >     line:       -1 >     frame #1 >       line:     0 >       source: @test/tarantool-tests/lj-819-fix-missing-uclo.test.lua >       filename: test/tarantool-tests/lj-819-fix-missing-uclo.test.lua >       what:     main >       namewhat: >       src: test/tarantool-tests/lj-819-fix-missing-uclo.test.lua >     frame #2 >       line:     -1 >       source:   =[C] >       filename: eval >       what:     C >       namewhat: >       src:      [C] > luajit: > /home/sergeyb/sources/MRG/tarantool/third_party/luajit/src/lj_record.c:135: > rec_check_slots: Assertion `((((((tr))>>24) & IRT_TYPE) - > (TRef)(IRT_NUM) <= (TRef)(IRT_INT-IRT_NUM)))' failed. > Aborted (core dumped) > > With pcall: > > TAP version 13 > 1..2 > not ok - VM consistency: type of returned value is correct > >    filename:   eval >     line:       -1 >     frame #1 >       line: 0 >       source: @test/tarantool-tests/lj-819-fix-missing-uclo.test.lua >       filename: test/tarantool-tests/lj-819-fix-missing-uclo.test.lua >       what:     main >       namewhat: >       src: test/tarantool-tests/lj-819-fix-missing-uclo.test.lua >     frame #2 >       line:     -1 >       source:   =[C] >       filename: eval >       what:     C >       namewhat: >       src:      [C] > not ok - consistency on compilation: type of returned value is correct >     filename:   eval >     line:       -1 >     frame #1 >       line:     0 > > > > > I like second output more. Yes, but there is no trace related to the `f()` only for `test:check()`: | ---- TRACE 1 start tap.lua:33 | ---- TRACE 2 start 1/stitch tap.lua:34 | ---- TRACE 3 start tap.lua:16 | ---- TRACE 3 start tap.lua:80 So, with this `pcall()` we lose the JIT testing. > > > > > Also, the test isn't failed with assertion failure as declared. But the > > following one is: > > | LUA_PATH="src/?.lua;;" src/luajit -Ohotloop=1 -e ' > > | > > | local function missing_uclo() > > | while true do -- luacheck: ignore > > | local f > > | if false then break end > > | while true do > > | if f then > > | return f > > | end > > | f = function() > > | return f > > | end > > | end > > | end > > | end > > | > > | -- Function to pollute Lua stack. > > | local function ret_arg(f) return f end > > | > > | f = missing_uclo() > > | ret_arg(f()) > > | ret_arg(f()) > > | ' > > > >> + > >> +os.exit(test:check() and 0 or 1) > > [1]: https://github.com/tarantool/tarantool/wiki/Code-review-procedure#commit-message > > -- Best regards, Sergey Kaplun