[Tarantool-patches] [PATCH luajit] x64: Fix __call metamethod return dispatch.
Igor Munkin
imun at tarantool.org
Fri Dec 4 17:35:04 MSK 2020
Sergey,
Thanks for your review!
On 04.12.20, Sergey Kaplun wrote:
> Hi, Igor!
>
> Thanks for the patch!
> LGTM except the single nit.
Added your tag:
| Reviewed-by: Sergey Kaplun <skaplun at tarantool.org>
>
> On 04.12.20, Igor Munkin wrote:
> > From: Mike Pall <mike>
> >
> > After linking new cframe to the chain KBASEa still stores the address of
> > the previous one. If the execution proceeds to <lj_vmeta_call> KBASE
> > value (i.e. low 32 bits of the stored address) might be equal to the
> > current BASE address value so the execution takes the invalid path. Such
> > address clashing occurs only on x86_64 platform with disabled LJ_GC64,
>
> Typo: s/address/address parts/ (considering your message in PR).
Thanks, fixed.
>
> > so 64-bit registers have to be compared in x64 build.
> >
> > NB: Though there is only 32-bit load to restore BASE value prior to the
> > comparison, the high 32 bits of RDX are reset to zeros, according to x86
> > long mode semantics.
> >
> > Igor Munkin:
> > * backported the original patch to tarantool/luajit repo
> > * extended the original commit message with the rationale
> >
> > For more info and explanation see LuaJIT/LuaJIT#636.
> >
> > Relates to tarantool/tarantool#4518
> > Relates to tarantool/tarantool#4649
> >
> > Signed-off-by: Igor Munkin <imun at tarantool.org>
> > ---
> >
<snipped>
> >
>
> --
> Best regards,
> Sergey Kaplun
--
Best regards,
IM
More information about the Tarantool-patches
mailing list