Hi!
Thanks for the clarification!
LGTM
 
 
--
Best regards,
Maxim Kokryashkin
 
 
Воскресенье, 18 февраля 2024, 14:58 +03:00 от Sergey Kaplun <skaplun@tarantool.org>:
 
Hi, Maxim!

On 18.02.24, Maxim Kokryashkin wrote:
>
> Hi, thanks for the fixup!
> IINM, the LUAJIT_NO_UNWIND flag means that there is no
> external unwinding, and internal unwinding is used instead,
> without any additional configuration. Do we really need to add
> this extra flag?

This is a tag for the testing suite. As you can see, it adds the
additional flag to index the file to skip. Option LUAJIT_NO_UNWIND is
already used, see <CMakeLists.txt>:
| option(LUAJIT_NO_UNWIND "Disable external unwinding.")
With internal unwinder, there is no interoperability with C++ ABI
exceptions, so exeptions from this <catch.cpp.lua> are not catched
(predictable), and this aborts the process.

>  
>  
> --
> Best regards,
> Maxim Kokryashkin
>  
>  
> > 
> >>Hi, folks!
> >>
> >>I found that with disabled external unwinding, the <catch_cpp.lua> fails
> >>(predictably). The following patch fixes it (squashed it with the
> >>corresponding commit).
> >>===================================================================
> >>diff --git a/test/LuaJIT-tests/CMakeLists.txt b/test/LuaJIT-tests/CMakeLists.txt
> >>index e91e3d4a..a0fb5440 100644
> >>--- a/test/LuaJIT-tests/CMakeLists.txt
> >>+++ b/test/LuaJIT-tests/CMakeLists.txt
> >>@@ -57,12 +57,19 @@ if(LUAJIT_USE_ASAN)
> >>   endif()
> >> endif()
> >> 
> >>+if(LUAJIT_NO_UNWIND)
> >>+ # Test <catch_cpp.lua> verifies the interoperability with C++
> >>+ # ABI exceptions, so it requires external unwinding enabled.
> >>+ # Hence, skip them otherwise.
> >>+ set(LUAJIT_TEST_TAGS_EXTRA +internal_unwinder)
> >>+endif()
> >>+
> >> add_custom_command(TARGET LuaJIT-tests
> >>   COMMENT "Running LuaJIT-tests"
> >>   COMMAND
> >>     env
> >>       ${LUAJIT_TESTS_ENV}
> >>       ${LUAJIT_TEST_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}/test.lua
> >>- +slow +ffi +bit +jit
> >>+ +slow +ffi +bit +jit ${LUAJIT_TEST_TAGS_EXTRA}
> >>   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
> >> )
> >>diff --git a/test/LuaJIT-tests/lang/index b/test/LuaJIT-tests/lang/index
> >>index 41f7e7db..4ff7a297 100644
> >>--- a/test/LuaJIT-tests/lang/index
> >>+++ b/test/LuaJIT-tests/lang/index
> >>@@ -1,7 +1,7 @@
> >> andor.lua
> >> api_call.lua
> >> assignment.lua
> >>-catch_cpp.lua
> >>+catch_cpp.lua -internal_unwinder
> >> catch_wrap.lua
> >> compare.lua
> >> compare_nan.lua
> >>===================================================================
> >>
> >>--
> >>Best regards,
> >>Sergey Kaplun
> > 

--
Best regards,
Sergey Kaplun