From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Sergey Bronnikov <estetus@gmail.com> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH luajit][v2] Handle all stack layouts in (delayed) TRACE vmevent. Date: Fri, 7 Feb 2025 13:50:04 +0300 [thread overview] Message-ID: <Z6XlXPIisc5Appmk@root> (raw) In-Reply-To: <d9fb704dfdc4518d6be56b61193856deb9374d52.1738828623.git.sergeyb@tarantool.org> Hi, Sergey! Thanks for the fixes! LGTM, after fixing a bunch of nits below. On 06.02.25, Sergey Bronnikov wrote: > From: Mike Pall <mike> > <snipped> > --- > Branch: https://github.com/tarantool/luajit/tree/ligurio/lj-1087-vm-handler-call > > Related issues: > - https://github.com/LuaJIT/LuaJIT/issues/1087 > - https://github.com/tarantool/tarantool/issues/10709 > > Changes in the v2: > * Addressed comments by Sergey Kaplun > <snipped> > diff --git a/src/lj_trace.c b/src/lj_trace.c > index 94cb27e5..6b97cc13 100644 > --- a/src/lj_trace.c > +++ b/src/lj_trace.c <snipped> > diff --git a/test/tarantool-c-tests/lj-1087-vm-handler-call.test.c b/test/tarantool-c-tests/lj-1087-vm-handler-call.test.c > new file mode 100644 > index 00000000..ebdf63e1 > --- /dev/null > +++ b/test/tarantool-c-tests/lj-1087-vm-handler-call.test.c <snipped> > +/* XXX: Still need normal assert inside writer functions. */ Minor: Since there is no writer function, I would rather use the following wording: | Still need normal assert for sanity checks. > +#undef NDEBUG > +#include <assert.h> > + > +/* > + * Test file to demonstrate a segmentation fault, when C function Typo: s/C function/a C function/ > + * is used as a VM handler in LuaJIT: Minor: `as a VM handler for trace events` is a little bit more verbose. Feel free to ignore. > + * > + * Program received signal SIGSEGV, Segmentation fault. > + * 0x000055555557e77d in trace_abort (J=0x7ffff7f9b6b8) at lj_trace.c:615 > + * 615 lj_vmevent_send(L, TRACE, > + * (gdb) bt > + * > + * See details in https://github.com/LuaJIT/LuaJIT/issues/1087. > + */ > + <snipped> > + /* > + * The number 32767 is `REF_DROP - REF_BIAS`. It will be better to rephrase the next sentence. > See the commit > + * 0fdf06b456e6 ("test: relax JIT setup in misc.getmetrics > + * test") for the details. > + */ I suggest the following comment. | This is the maximum possible IR amount, so the trace is always | aborted. The amount of text to read is approximately the same, but we don't need to look into the mysterious commit anymore. :) > + int res = luaL_dostring(L, "jit.opt.start('minstitch=32767')"); <snipped> -- Best regards, Sergey Kaplun
next prev parent reply other threads:[~2025-02-07 10:51 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-02-06 7:57 Sergey Bronnikov via Tarantool-patches 2025-02-07 10:50 ` Sergey Kaplun via Tarantool-patches [this message] 2025-02-07 12:57 ` Sergey Bronnikov via Tarantool-patches 2025-02-13 9:59 ` Sergey Kaplun via Tarantool-patches
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=Z6XlXPIisc5Appmk@root \ --to=tarantool-patches@dev.tarantool.org \ --cc=estetus@gmail.com \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit][v2] Handle all stack layouts in (delayed) TRACE vmevent.' \ /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