From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 85FBA237C7 for ; Thu, 5 Sep 2019 13:55:22 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AAzpA5ghnUWR for ; Thu, 5 Sep 2019 13:55:22 -0400 (EDT) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id C77CE237A6 for ; Thu, 5 Sep 2019 13:55:21 -0400 (EDT) From: Igor Munkin Subject: [tarantool-patches] [PATCH 0/1] Follow up for string.find recording fix Date: Thu, 5 Sep 2019 20:57:27 +0300 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: Igor Munkin The problem is faced only with enabled JIT. Fix provided within 587532e leads to invalid end index of the string being matched while recording. This offset is biased with the respect to position the match is initialized instead of the start of the origin string. Mr. Egorov approved Sergos proposal in his comment https://github.com/LuaJIT/LuaJIT/issues/505#issuecomment-528482812 and his solution is quite similar to the one I discussed offline with Sergos. Branch: https://github.com/tarantool/luajit/tree/imun/fix-string-find-recordiing Issue: https://github.com/tarantool/tarantool/issues/4476 Igor Munkin (1): luajit: fix string.find recording src/lj_ffrecord.c | 4 +- test/fix_string_find_recording.test.lua | 79 +++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 2 deletions(-) create mode 100755 test/fix_string_find_recording.test.lua -- 2.22.1