From: Igor Munkin via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Sergey Kaplun <skaplun@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH luajit v2] Fix frame traversal for __gc handler frames. Date: Wed, 24 Nov 2021 01:00:31 +0300 [thread overview] Message-ID: <YZ1kf6FVjYoxOCC5@tarantool.org> (raw) In-Reply-To: <20211119164157.18344-1-skaplun@tarantool.org> Sergey, I've checked the patch into all long-term branches in tarantool/luajit and bumped a new version in 1.10, 2.8 and master. On 19.11.21, Sergey Kaplun wrote: > From: Mike Pall <mike> > > Reported by Changochen. > > (cherry picked from 53f82e6e2e858a0a62fd1a2ff47e9866693382e6) > > A cframe unwinding is missed for a C protected frame during a search for > an error function to handle a runtime error. It leads to undefined > behaviour or crash, when raising a runtime error on stack with the CP > frame before an error function handler (for example, an error in __gc > handler). > > This patch adds missing unwinding for CP frame. > > Sergey Kaplun: > * added the description and the test for the problem > --- > > LuaJIT issue: https://github.com/LuaJIT/LuaJIT/issues/601 > Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-fix-gc-finderrfunc > Tarantool branch: https://github.com/tarantool/tarantool/tree/skaplun/gh-noticket-fix-gc-finderrfunc > > Changes in v2: > * Create CP and C stack manually in LuaC > > src/lj_err.c | 1 + > test/tarantool-tests/CMakeLists.txt | 1 + > .../lj-601-fix-gc-finderrfunc.test.lua | 35 ++++++++++++ > .../lj-601-fix-gc-finderrfunc/CMakeLists.txt | 1 + > .../lj-601-fix-gc-finderrfunc/mixcframe.c | 55 +++++++++++++++++++ > 5 files changed, 93 insertions(+) > create mode 100644 test/tarantool-tests/lj-601-fix-gc-finderrfunc.test.lua > create mode 100644 test/tarantool-tests/lj-601-fix-gc-finderrfunc/CMakeLists.txt > create mode 100644 test/tarantool-tests/lj-601-fix-gc-finderrfunc/mixcframe.c > <snipped> > -- > 2.31.0 > -- Best regards, IM
prev parent reply other threads:[~2021-11-23 22:01 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-19 16:41 Sergey Kaplun via Tarantool-patches 2021-11-23 12:57 ` Igor Munkin via Tarantool-patches 2021-11-23 22:00 ` Igor Munkin via Tarantool-patches [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=YZ1kf6FVjYoxOCC5@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=imun@tarantool.org \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit v2] Fix frame traversal for __gc handler frames.' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox