Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH luajit 0/6] FFI fixes
@ 2023-10-23  9:22 Sergey Kaplun via Tarantool-patches
  2023-10-23  9:22 ` [Tarantool-patches] [PATCH luajit 1/6] Abstract out on-demand loading of FFI library Sergey Kaplun via Tarantool-patches
                   ` (7 more replies)
  0 siblings, 8 replies; 31+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-10-23  9:22 UTC (permalink / raw)
  To: Maxim Kokryashkin, Sergey Bronnikov; +Cc: tarantool-patches

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


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2024-01-10  8:59 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23  9:22 [Tarantool-patches] [PATCH luajit 0/6] FFI fixes Sergey Kaplun via Tarantool-patches
2023-10-23  9:22 ` [Tarantool-patches] [PATCH luajit 1/6] Abstract out on-demand loading of FFI library Sergey Kaplun via Tarantool-patches
2023-10-24 14:38   ` Maxim Kokryashkin via Tarantool-patches
2023-11-29 14:35   ` Sergey Bronnikov via Tarantool-patches
2023-10-23  9:22 ` [Tarantool-patches] [PATCH luajit 2/6] FFI: Fix missing cts->L initialization in argv2ctype() Sergey Kaplun via Tarantool-patches
2023-10-24 14:49   ` Maxim Kokryashkin via Tarantool-patches
2023-10-25 10:19     ` Sergey Kaplun via Tarantool-patches
2023-11-29 14:39   ` Sergey Bronnikov via Tarantool-patches
2023-10-23  9:22 ` [Tarantool-patches] [PATCH luajit 3/6] FFI: Ensure returned string is alive in ffi.typeinfo() Sergey Kaplun via Tarantool-patches
2023-10-24 21:33   ` Maxim Kokryashkin via Tarantool-patches
2023-11-29 14:48   ` Sergey Bronnikov via Tarantool-patches
2023-10-23  9:22 ` [Tarantool-patches] [PATCH luajit 4/6] FFI: Fix dangling reference to CType Sergey Kaplun via Tarantool-patches
2023-10-25  7:48   ` Maxim Kokryashkin via Tarantool-patches
2023-10-25 10:43     ` Sergey Kaplun via Tarantool-patches
2023-10-25 11:42       ` Maxim Kokryashkin via Tarantool-patches
2023-10-25  8:06   ` Maxim Kokryashkin via Tarantool-patches
2023-11-29 15:00   ` Sergey Bronnikov via Tarantool-patches
2023-10-23  9:22 ` [Tarantool-patches] [PATCH luajit 5/6] FFI: Fix dangling reference to CType. Improve checks Sergey Kaplun via Tarantool-patches
2023-10-25  8:05   ` Maxim Kokryashkin via Tarantool-patches
2023-10-25 10:46     ` Sergey Kaplun via Tarantool-patches
2023-10-25 11:42       ` Maxim Kokryashkin via Tarantool-patches
2023-11-29 15:41   ` Sergey Bronnikov via Tarantool-patches
2023-11-30  7:25     ` Sergey Kaplun via Tarantool-patches
2023-12-19 10:55       ` Sergey Bronnikov via Tarantool-patches
2023-10-23  9:22 ` [Tarantool-patches] [PATCH luajit 6/6] FFI: Fix dangling reference to CType in carith_checkarg() Sergey Kaplun via Tarantool-patches
2023-10-25  8:07   ` Maxim Kokryashkin via Tarantool-patches
2023-10-25 10:48     ` Sergey Kaplun via Tarantool-patches
2023-10-25 11:42       ` Maxim Kokryashkin via Tarantool-patches
2023-12-19 10:59   ` Sergey Bronnikov via Tarantool-patches
2023-12-19 11:01 ` [Tarantool-patches] [PATCH luajit 0/6] FFI fixes Sergey Bronnikov via Tarantool-patches
2024-01-10  8:53 ` Igor Munkin via Tarantool-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox