[Tarantool-patches] [PATCH luajit] Fix limit check in narrow_conv_backprop().

Maxim Kokryashkin m.kokryashkin at tarantool.org
Mon Sep 23 09:41:32 MSK 2024


Hi, Sergey!
Thanks for the patch!
LGTM, except for a few nits below.

On Mon, Aug 26, 2024 at 03:37:40PM GMT, Sergey Kaplun wrote:
> From: Mike Pall <mike>
>
> Thanks to Sergey Kaplun.
>
> (cherry picked from commit e45fd4cb713b610506213692f3b55a1869febb03)
>
> `narrow_conv_backprop()` misses the stack pointer (`nc->sp`) limit check
> after a bunch of recursive calls that may change its value. As a result,
It took me a minute to understand that sentence. Let's paraphrase it the
following way:

| The function narrow_conv_backprop() does not include a limit
| check for the stack pointer (nc->sp), even though its value may
| change after several recursive calls.

> it leads to stack-buffer-overflow during the instruction narrowing. This
> patch adds a missing check.
Typo: s/a missing/the missing

>
> Sergey Kaplun:
> * added the description and the test for the problem
>
> Part of tarantool/tarantool#10199
> ---
>
> Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-1262-fix-limit-narrow-conv-backprop
> Related issues:
> * https://github.com/tarantool/tarantool/issues/10199
> * https://github.com/LuaJIT/LuaJIT/issues/1262

<snipped>


More information about the Tarantool-patches mailing list