[Tarantool-patches] [PATCH luajit 0/6] FFI fixes

Igor Munkin imun at tarantool.org
Wed Jan 10 11:53:06 MSK 2024


Sergey,

I've checked the patchset into all long-term branches in
tarantool/luajit and bumped a new version in master, release/2.11 and
release/2.10.

On 23.10.23, Sergey Kaplun via Tarantool-patches wrote:
> This patchset is an umbrella for all FFI fixes and refactoring to be
> done in #9145.
> 
> The first patch is a refactoring, and it will be useful for us when we
> do #4738. The next two patches are just some FFI bugs to be fixed. The
> last three patches are minor fixes use-after-free references of the
> `cts->tab` objects.
> 
> Branch: https://github.com/tarantool/luajit/tree/skaplun/ffi-fixes
> Tarantool PR: https://github.com/tarantool/tarantool/pull/9285
> Related issues:
> * https://github.com/LuaJIT/LuaJIT/issues/745
> * https://github.com/LuaJIT/LuaJIT/issues/920
> * https://github.com/LuaJIT/LuaJIT/issues/1108
> * https://github.com/tarantool/tarantool/issues/9145
> * https://github.com/tarantool/tarantool/issues/4738
> 
> Mike Pall (6):
>   Abstract out on-demand loading of FFI library.
>   FFI: Fix missing cts->L initialization in argv2ctype().
>   FFI: Ensure returned string is alive in ffi.typeinfo().
>   FFI: Fix dangling reference to CType.
>   FFI: Fix dangling reference to CType. Improve checks.
>   FFI: Fix dangling reference to CType in carith_checkarg().
> 
>  src/lib_ffi.c                                 |  1 +
>  src/lib_jit.c                                 |  6 +-
>  src/lj_bcread.c                               |  6 +-
>  src/lj_carith.c                               |  4 +
>  src/lj_cconv.c                                |  2 +
>  src/lj_crecord.c                              |  6 +-
>  src/lj_ctype.c                                | 12 +++
>  src/lj_ctype.h                                | 10 +++
>  src/lj_lex.c                                  |  6 +-
>  .../fix-argv2ctype-cts-L-init.test.lua        | 15 ++++
>  .../fix-argv2ctype-cts-L-init/script.lua      | 14 ++++
>  .../fix-dangling-reference-to-ctype.test.lua  | 59 ++++++++++++++
>  ...8-fix-dangling-reference-to-ctype.test.lua | 67 ++++++++++++++++
>  .../lj-745-ffi-typeinfo-dead-names.test.lua   | 28 +++++++
>  ...0-fix-dangling-reference-to-ctype.test.lua | 77 +++++++++++++++++++
>  15 files changed, 297 insertions(+), 16 deletions(-)
>  create mode 100644 test/tarantool-tests/fix-argv2ctype-cts-L-init.test.lua
>  create mode 100644 test/tarantool-tests/fix-argv2ctype-cts-L-init/script.lua
>  create mode 100644 test/tarantool-tests/fix-dangling-reference-to-ctype.test.lua
>  create mode 100644 test/tarantool-tests/lj-1108-fix-dangling-reference-to-ctype.test.lua
>  create mode 100644 test/tarantool-tests/lj-745-ffi-typeinfo-dead-names.test.lua
>  create mode 100644 test/tarantool-tests/lj-920-fix-dangling-reference-to-ctype.test.lua
> 
> -- 
> 2.42.0
> 

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list