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 EF41557190; Thu, 10 Nov 2022 09:05:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EF41557190 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1668060347; bh=ReKLQ8WSoo+5T0KB4ifSfHImqT5xKF2SrhA3Gf2+qYw=; 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=xCsZS90FgD0Ylt6Tx7mRNRzUgv8cwyP8R42X66R2GSDJRORb6v9XLhyZHaKQlBsSZ bRptPzBiNjAcGIhJYSyzAsIiRe7YV7YCfF9MumIqwJVneJPfw0LK80mCYrDw/wuITv QCmWLCFrUTFRTe9aXhKdMYO6+M3u3ninnzbzPpP0= Received: from smtp42.i.mail.ru (smtp42.i.mail.ru [94.100.177.102]) (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 4EF4C6FFCC for ; Thu, 10 Nov 2022 09:05:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4EF4C6FFCC Received: by smtp42.i.mail.ru with esmtpa (envelope-from ) id 1ot0h7-0004tA-FY; Thu, 10 Nov 2022 09:05:45 +0300 Date: Thu, 10 Nov 2022 09:02:40 +0300 To: Maxim Kokryashkin , Igor Munkin Cc: tarantool-patches@dev.tarantool.org Message-ID: References: <20221109174948.10952-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221109174948.10952-1-skaplun@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD95B5D117648C7F1522511330F755B0FCE866F7139B2072891182A05F538085040C84426EB9DDAFA3CF4487FC6004A05835FE21B6D5464E1E300B8FC57767E1969 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE779AAD18609327F83EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B997C8222C70C3D98638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D812E24CC19AE8A3C07C247E6704057FC7117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF80095D1E57F4578A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520902A1BE408319B2928451B159A507268D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE042285CD7A5C321F49AF716F719AB83ED8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3F8BD4E506CFA3D8803F1AB874ED89028C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637C3090DF2C0002BD1EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D16EA493CC1FD9F8402A11F33FBE4CF476F1F2991DBB45DC3A16C89366C09480AAB5C2274DEBAF4D1D7E09C32AA3244CA502FFF416143CCDA7CBD2B6ACDA93C79CA7333006C390A0FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojDvKINbZCEhLClK0Bnjb3oQ== X-Mailru-Sender: 87D5297B137A96FE4AECA001A08BCABA686FB5AEF6518FD6BBAFFCC837DBFFC68C3032C475F3EEDF525762887713E5F1475755348978188EF9D3679FA3DE6E791CC59163FFD68303B0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] Ensure correct stack top for OOM error message. 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, again! On 09.11.22, Sergey Kaplun wrote: > From: Mike Pall > + > +-- Avoid OOM on traces. > +jit.off() > + > +-- Stack slots are needed for coredump in case of misbehaviour. > +-- luacheck: no unused > +local r, e = pcall(eat_chunks, 8 * MB) > +collectgarbage() > +pcall(eat_chunks, 8 * KB) > +collectgarbage() > +pcall(eat_chunks, 8) > +collectgarbage() Forgot that `collectgarbage()` (`full_gc()`) enables GC. Fixed. Branch is force-pushed. =================================================================== diff --git a/test/tarantool-tests/lj-906-fix-err-mem.test.lua b/test/tarantool-tests/lj-906-fix-err-mem.test.lua index a139e1c9..f512e802 100644 --- a/test/tarantool-tests/lj-906-fix-err-mem.test.lua +++ b/test/tarantool-tests/lj-906-fix-err-mem.test.lua @@ -74,10 +74,13 @@ jit.off() -- luacheck: no unused local r, e = pcall(eat_chunks, 8 * MB) collectgarbage() +collectgarbage('stop') pcall(eat_chunks, 8 * KB) collectgarbage() +collectgarbage('stop') pcall(eat_chunks, 8) collectgarbage() +collectgarbage('stop') pcall(frame_before_TDUP) =================================================================== > + > +pcall(frame_before_TDUP) > + > +-- Release memory for `tap` functions. > +gc_anchor = nil > +collectgarbage() > + > +test:ok(true, 'correctly throw memory error') > + > +os.exit(test:check() and 0 or 1) > -- > 2.34.1 > -- Best regards, Sergey Kaplun