Tarantool development patches archive
 help / color / mirror / Atom feed
From: Igor Munkin <imun@tarantool.org>
To: Sergey Ostanevich <sergos@tarantool.org>
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
	tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit 2/2] jit: abort trace execution on JIT mode change
Date: Sun, 29 Mar 2020 13:46:14 +0300	[thread overview]
Message-ID: <20200329104614.GI22874@tarantool.org> (raw)
In-Reply-To: <20200328193618.GB328@tarantool.org>

Sergos,

Thanks for you review!

On 28.03.20, Sergey Ostanevich wrote:
> Hi!
> 
> Thanks for the patch, LGTM.
> 
> Sergos.
> 
> On 27 мар 13:47, Igor Munkin wrote:
> > Current luaJIT_setmode implementation aborts trace recording but nothing
> > prevents calling it on already compiled trace. E.g. if one conditionally
> > calls an FFI function having luaJIT_setmode with LUAJIT_MODE_FLUSH mode
> > underneath, the trace being executed can be purged and the return
> > address is invalidated as a result (since the mcode is released).
> > 
> > This changeset prohibits luaJIT_setmode call while mcode is being
> > executed leading to platform panic if the call occurs.

I reworded this section considering your comment about platform panic:

================================================================================

This changeset prohibits luaJIT_setmode call while mcode is being
executed. If the call occurs the platform finishes its execution with
EXIT_FAILURE code and calls panic routine prior to the exit.

================================================================================

> > 

Reviewed-by: Sergey Ostanevich <sergos@tarantool.org>

> > Signed-off-by: Igor Munkin <imun@tarantool.org>
> > ---
> >  src/lj_dispatch.c                     |  5 +++++
> >  src/lj_errmsg.h                       |  1 +
> >  test/lj-flush-on-trace/CMakeLists.txt |  1 +
> >  test/lj-flush-on-trace/libflush.c     | 31 +++++++++++++++++++++++++++
> >  test/lj-flush-on-trace/test.lua       | 25 +++++++++++++++++++++
> >  5 files changed, 63 insertions(+)
> >  create mode 100644 test/lj-flush-on-trace/CMakeLists.txt
> >  create mode 100644 test/lj-flush-on-trace/libflush.c
> >  create mode 100644 test/lj-flush-on-trace/test.lua
> > 

<snipped>

> > -- 
> > 2.25.0
> > 

-- 
Best regards,
IM

  reply	other threads:[~2020-03-29 10:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-27 10:47 [Tarantool-patches] [PATCH luajit 0/2] Trace abort on FFI sandwich or " Igor Munkin
2020-03-27 10:47 ` [Tarantool-patches] [PATCH luajit 1/2] jit: abort trace recording and execution for C API Igor Munkin
2020-03-28 16:33   ` Sergey Ostanevich
2020-03-28 20:30     ` Igor Munkin
2020-03-29  9:21       ` Sergey Ostanevich
2020-03-29 10:45         ` Igor Munkin
2020-03-30  8:58           ` Sergey Ostanevich
2020-03-30 14:25             ` Igor Munkin
2020-04-03 21:06               ` Sergey Ostanevich
2020-04-03 21:31                 ` Igor Munkin
2020-04-02 23:41   ` Vladislav Shpilevoy
2020-04-04 11:55     ` Igor Munkin
2020-04-04 21:37       ` Vladislav Shpilevoy
2020-04-07 21:16         ` Igor Munkin
2020-03-27 10:47 ` [Tarantool-patches] [PATCH luajit 2/2] jit: abort trace execution on JIT mode change Igor Munkin
2020-03-28 19:36   ` Sergey Ostanevich
2020-03-29 10:46     ` Igor Munkin [this message]
2020-04-02 23:41 ` [Tarantool-patches] [PATCH luajit 0/2] Trace abort on FFI sandwich or " Vladislav Shpilevoy
2020-04-03 21:32   ` Igor Munkin
2020-04-04 21:36     ` Vladislav Shpilevoy

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=20200329104614.GI22874@tarantool.org \
    --to=imun@tarantool.org \
    --cc=sergos@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit 2/2] jit: abort trace execution on JIT mode change' \
    /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