Skip to content
Snippets Groups Projects
  1. Aug 24, 2023
    • Sergey Bronnikov's avatar
      ci: update paths in a publish module api doc workflow · 1d53fda6
      Sergey Bronnikov authored
      Module API documentation is described in Doxygen comments in C/C++ files
      in src/ directory. No sense to run this job for other changes. The patch
      changes paths in workflow accordingly.
      
      NO_CHANGELOG=ci
      NO_DOC=ci
      NO_TEST=ci
      
      (cherry picked from commit 9af36ae1)
      1d53fda6
    • Sergey Bronnikov's avatar
      ci: update paths in a fuzzing workflow · 7da94b5c
      Sergey Bronnikov authored
      Fuzzing is a heavyweight job, we can reduce a set of paths used for
      triggering this job and therefore reduce an overall time of testing in
      some cases.
      
      The patch replaces `.github/workflows/**` to
      `.github/workflows/fuzzing.yml` because workflows are independent and
      changes in other workflows does not affect fuzzing at all and patch adds
      Lua files (`**.lua`) to ignores because fuzzing focused on C/C++ code.
      
      NO_CHANGELOG=ci
      NO_DOC=ci
      NO_TEST=ci
      
      (cherry picked from commit f14cb97d)
      7da94b5c
    • Ilya Verbin's avatar
      box: fix memory leak on error_unpack_unsafe() failure · c7b6e3b5
      Ilya Verbin authored
      Memory is leaked in the following scenario:
      - MP_ERROR_STACK with 2 errors is passed to error_unpack_unsafe():
        1. A correct MP_MAP with MP_ERROR_* fields;
        2. Something unexpected, e.g. MP_INT;
      - This first call to mp_decode_error_one() allocates memory for the first
        error in error_build_xc() -> `new ClientError()`;
      - The second call to mp_decode_error_one() returns NULL, and
        error_unpack_unsafe() returns NULL too. Memory from the previous step
        is leaked.
      
      Closes #8921
      
      NO_DOC=bugfix
      
      (cherry picked from commit b367fb98)
      c7b6e3b5
    • Ilya Verbin's avatar
      box: validate key_def->part_count prior to memory allocation · 2d6fd5cf
      Ilya Verbin authored
      part_count was checked in index_def_check(), which was called too late.
      Before that check:
      1. `malloc(sizeof(*part_def) * part_count)` can fail for huge part_count;
      2. key_def_new() can crash for zero part_count because of out of bound
         access in:
      
      NO_WRAP
         - #1 key_def_contains_sequential_parts (def=0x5555561a2ef0) at src/box/tuple_extract_key.cc:26
         - #2 key_def_set_extract_func (key_def=0x5555561a2ef0) at src/box/tuple_extract_key.cc:442
         - #3 key_def_set_func (def=0x5555561a2ef0) at src/box/key_def.c:162
         - #4 key_def_new (parts=0x7fffc4001350, part_count=0, for_func_index=false) at src/box/key_def.c:320
      NO_WRAP
      
      Closes #8688
      
      NO_DOC=bugfix
      
      (cherry picked from commit ef9e3320)
      2d6fd5cf
  2. Aug 22, 2023
    • Timur Safin's avatar
      Revert "debugger: prevent running from Tarantool REPL" · bd1bf0e2
      Timur Safin authored
      This reverts commit ace88542.
      
      That commit disabled repl in tarantool for debugger console session
      because debugger console wasn't compatible with Tarantool console,
      i.e. this code hang in terminal:
      
      ```lua
      tarantool> dbg = require 'luadebug'
      tarantool> dbg()
      ```
      
      With the previous patch in the patchset, full readline support and
      console compatibility was introduced. Thus, no need to disable repl.
      
      Part of #7738
      
      NO_TEST=internal
      NO_DOC=internal, revert unpublished
      NO_CHANGELOG=internal
      
      (cherry picked from commit 3774e85d)
      bd1bf0e2
    • Timur Safin's avatar
      debugger: proper readline support · df7675dc
      Timur Safin authored
      Implemented readline history and autocomplete by reusing
      readline facilities of Tarantool console. They used to be
      being hidden once Lua 'console' module is loaded. With c432e9e9
      (lua: don't use public module name as internal one), now they
      are available as 'console.lib'.
      
      Closes #7738
      
      NO_TEST=covered by refactored console_debugger_session_test.lua
      
      @TarantoolBot document
      Title: proper readline support in readline
      
      Similar to tarantool interactive console, tdbg now uses readline
      for its shell. It enables handier input editing, command history
      and so on.
      
      (cherry picked from commit 92222451)
      df7675dc
    • Gleb Kashkin's avatar
      test: refactor dbgr test with `it` helper · ca5384e2
      Gleb Kashkin authored
      `console_debugger_session_test.lua` can be simplified and made more
      stable with interactive_tarantool helper. With the new
      `read_untill_prompt()` helper function, dbgr prompt can be used as
      end-of-output marker instead of '...' in yaml-outputting main console.
      This way, popen results are unambiguous and no retries are required.
      At the same time, dbgr prompt is now expected with every result, thus
      there is no need for an extra check. But `continue` command usually
      reaches the end of the script and exits debugger, thus
      '<END_OF_EXECUTION>' marker was introduced.
      Empty stderr and header check were moved to interactive_tarantool helper.
      This patch breaks the test without debugger readline support patch,
      that is next in the patchset.
      
      Part of #7738
      
      NO_CHANGELOG=test refactoring
      NO_DOC=test refactoring
      
      (cherry picked from commit 72008443)
      ca5384e2
    • Gleb Kashkin's avatar
      test: update interactive_tarantool for dbgr tests · bdc622e9
      Gleb Kashkin authored
      The following changes were applied to `interactive_tarantool` helper
      to adapt it for debugger tests:
      * compared commands are now stripped from tabs and color codes too
      * now each command independent of control symbols is being stripped
        before comparison in `execute_command()`
      * created internal new function that is called from both `new()` and
        `new_debugger()`
      * now user defined prompt can be set up from `new` and `new_debugger()`
      * now there are several less typos in comments
      
      Part of #7738
      
      NO_CHANGELOG=test helper update
      NO_DOC=test helper update
      NO_TEST=test helper update
      
      (cherry picked from commit 11dddb65)
      bdc622e9
    • Timur Safin's avatar
      debugger: refactor debugging scenarios · 6bc2a030
      Timur Safin authored
      Refactor the way how we run various debugger scenarios, getting rid
      of external static file, and producing debuggee scripts on the fly.
      The idea is to have everything in the single source: both source
      script to be used for debugging, and corresponding debugger commands.
      
      NO_DOC=internal
      NO_CHANGELOG=internal
      
      (cherry picked from commit 7314a1bd)
      6bc2a030
    • Timur Safin's avatar
      debugger: introduce logging facility · 8c46b3fe
      Timur Safin authored
      It's frequently needed to see interaction of a luatest script
      and its chield launched via popen.
      Now we display extra debugging information received from
      children pipes directly to the parent screen. It's hidden
      by default by luatest (if everything goes well), but could
      be displayed with `luatest -c` option.
      
      ```
      luatest -c -v app-luatest/console_debugger_session_test.lua
      ```
      
      NO_DOC=internal
      NO_CHANGELOG=internal
      
      (cherry picked from commit 7a813f43)
      8c46b3fe
    • Yaroslav Lobankov's avatar
      make: fix hard-coded compiler version in .test.mk · fc14740f
      Yaroslav Lobankov authored
      Remove hard-coded compiler version for the `test-release-asan` target
      in the .test.mk file.
      
      NO_DOC=make
      NO_TEST=make
      NO_CHANGELOG=make
      
      (cherry picked from commit ed35713e)
      fc14740f
  3. Aug 21, 2023
    • Ilya Verbin's avatar
      test: fix fiber stack overflow test not overflowing · 77fcc44c
      Ilya Verbin authored
      test/unit/guard.cc calls stack_break_f() recursively until the stack
      overflows and a signal is fired, however it relies on undefined behavior
      when compares pointers to local variables. Fixed by comparing
      __builtin_frame_address() instead.
      
      One of the examples of this UB is when ASAN allocates local variables on
      fake stacks, in that case the test completes without the stack overflow.
      
      Also this patch disables ASAN for stack_break_f() to keep the array on the
      fiber stack (see the corresponding comment) and marks it as volatile to
      avoid optimizing it away by the compiler.
      
      Closes tarantool/tarantool-qa#323
      
      NO_DOC=test fix
      NO_CHANGELOG=test fix
      
      (cherry picked from commit 05b696c7)
    • Kirill Yukhin's avatar
      Generate changelog for 2.11.1 · 96877bd3
      Kirill Yukhin authored
      Also, remove RC-related changelog and unreleased/ entries.
      
      NO_DOC=no code changes
      NO_TEST=no code changes
      NO_CHANGELOG=no code changes
  4. Aug 17, 2023
    • Vladimir Davydov's avatar
      lua: fix heap-use-after-free bug in tuple format constructor · 4123061b
      Vladimir Davydov authored
      Runtime tuple formats are reusable, which means that a tuple format
      returned by runtime_tuple_format_new may not be brand new, but actually
      be used by a Lua object. As a result, if we call any function that may
      trigger Lua GC between runtime_tuple_format_new and tuple_format_ref,
      the tuple format may be deleted, leading to a use-after-free bug. This
      is what happens in lbox_tuple_format_new. Fix this issue by taking a
      reference to the format before pushing a cdata object to the Lua stack
      in lbox_push_tuple_format.
      
      The issue was fixed in the master branch by commit 28ec245d ("lua:
      fix heap-use-after-free bug in tuple format constructor"). This isn't
      a clean cherry-pick because the code changed quite a bit.
      
      Closes #8889
      
      NO_DOC=bug fix
      NO_TEST=difficult to reproduce, found by ASAN
      4123061b
  5. Aug 16, 2023
    • Igor Munkin's avatar
      luajit: bump new version · 578b16a5
      Igor Munkin authored
      * ci: support coveralls
      * cmake: add code coverage support
      * test: run flake8 static analysis via CMake
      * test: fix E741 errors by pycodestyle
      * test: fix E722 errors by pycodestyle
      * test: fix E711 errors by pycodestyle
      * test: fix E502 errors by pycodestyle
      * test: fix E501 errors by pycodestyle
      * test: fix E305 errors by pycodestyle
      * test: fix E303 errors by pycodestyle
      * test: fix E302 errors by pycodestyle
      * test: fix E301 errors by pycodestyle
      * test: fix E275 errors by pycodestyle
      * test: fix E251 errors by pycodestyle
      * test: fix E231 errors by pycodestyle
      * test: fix E203 errors by pycodestyle
      * test: fix E201 and E202 errors by pycodestyle
      * test: suppress E131 errors by pycodestyle
      * test: fix E128 errors by pycodestyle
      * test: fix E122 errors by pycodestyle
      * gdb: fix Python <assert> statement usage
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      NO_CHANGELOG=LuaJIT submodule bump
      578b16a5
    • Sergey Bronnikov's avatar
      test/static: add a seed corpus for decimal_to_int64_fuzzer · 33f638df
      Sergey Bronnikov authored
      NO_DOC=seed corpus
      NO_CHANGELOG=seed corpus
      NO_TEST=seed corpus
      
      (cherry picked from commit 4894863e)
      33f638df
    • Sergey Bronnikov's avatar
      test/fuzz: add fuzzing test for decoding decimals · 0561f59d
      Sergey Bronnikov authored
      NO_DOC=testing
      NO_CHANGELOG=testing
      
      (cherry picked from commit 4deadeb8)
      0561f59d
    • Sergey Bronnikov's avatar
      test/static: add a seed corpus for IPROTO decoders · 12072c54
      Sergey Bronnikov authored
      NO_DOC=seed corpus
      NO_CHANGELOG=seed corpus
      NO_TEST=seed corpus
      
      (cherry picked from commit 4b5fb953)
      12072c54
    • Sergey Bronnikov's avatar
      test/fuzz: add fuzzing tests for IPROTO decoders · 28ac9328
      Sergey Bronnikov authored
      Examples of IPROTO decoding issues: #3900, #1928, #6781.
      Patch adds a number of fuzzing tests that covers IPROTO decoding:
      
      - xrow_decode_auth
      - xrow_decode_begin
      - xrow_decode_call
      - xrow_decode_dml
      - xrow_decode_id
      - xrow_decode_raft
      - xrow_decode_sql
      - xrow_decode_watch
      - xrow_greeting_decode
      
      NO_DOC=testing
      NO_CHANGELOG=testing
      
      (cherry picked from commit 46cacf35)
      28ac9328
  6. Aug 15, 2023
    • Ilya Verbin's avatar
      box: move index_opts::hint check from Lua to space_check_index_def · 96fa495b
      Ilya Verbin authored
      The checks in box.schema.index.create() and box.schema.index.alter()
      were case sensitive, also it was possible to insert incorrect index
      options directly into `box.space._index`. Fixed by adding checks
      to memtx_space_check_index_def() and vinyl_space_check_index_def().
      
      Closes #8937
      
      NO_DOC=bugfix
      
      (cherry picked from commit 4e25384b)
      96fa495b
    • Ilya Verbin's avatar
      box: replace malloc with xmalloc in index_def_dup · 640eb0f1
      Ilya Verbin authored
      And remove unused index_def_check_xc().
      
      As index_def_dup() never returns NULL anymore, change index_create() and
      index_read_view_create() return type to `void` and update their callers.
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      
      (cherry picked from commit f6d61754)
      640eb0f1
    • Sergey Bronnikov's avatar
      test/fuzz: collect and print Lua metrics · ed09e726
      Sergey Bronnikov authored
      Fuzzing test for LuaJIT generates random Lua programs and executes them.
      We want to build a fuzzing test that will produce Lua programs that will
      not contain semantic errors and will trigger as much as possible
      components in LuaJIT.
      
      This proposed patch introduces metrics that gathered after running the
      test. LuaJIT metrics gathered using LuaJIT getmetrics module [1]. All
      gathered metrics test will output after running with a finite number of
      runs or finite duration of time (options `-runs` and `-max_total_time`)
      or after sending SIGUSR1 to a test process.
      
      ```
      $ ./build/test/fuzz/luaL_loadbuffer/luaL_loadbuffer_fuzzer -runs=1000
      
      <snipped>
      
      Done 1000 runs in 1 second(s)
      Total number of samples: 1000
      Total number of samples with errors: 438 (43%)
      Total number of samples with recorded traces: 87 (8%)
      Total number of samples with snap restores: 30 (3%)
      Total number of samples with abort traces: 55 (5%)
      ```
      
      1. https://www.tarantool.io/en/doc/latest/reference/tooling/luajit_getmetrics/#getmetrics-c-api
      
      NO_CHANGELOG=testing
      NO_DOC=testing
      ed09e726
    • Ilya Verbin's avatar
      core: fix ASAN_START_SWITCH_FIBER() usage · 20be04bd
      Ilya Verbin authored
      The `__sanitizer_start_switch_fiber()` function takes a pointer as the
      first argument to store the current fake stack if there is one (it is
      necessary when stack-use-after-return detection is enabled). When leaving a
      fiber definitely, NULL must be passed so that the fake stack is destroyed.
      
      Before this patch, NULL was passed for dead fibers, however this is wrong
      for dead fibers that are recycled and resumed. In such cases ASAN destroys
      the fake stack, and the fiber crashes trying to use it in `fiber_yield()`
      upon return from `coro_transfer()`.
      
      Closes tarantool/tarantool-qa#321
      
      NO_DOC=bugfix
      NO_TEST=tested by test-release-asan workflow
      
      (cherry picked from commit 72a6abee)
      20be04bd
  7. Aug 14, 2023
    • Vladimir Davydov's avatar
      box: fix box.iproto.override crash if used before box.cfg · 4a6ffba1
      Vladimir Davydov authored
      The function can't be called on an unconfigured instance because it
      needs IPROTO threads up and running. Let's raise an error to avoid
      a crash.
      
      Since we have two other places where we need to raise the same error
      (box.session.su and box.__index), let's introduce the new code
      ER_UNCONFIGURED for this error.
      
      Closes #8975
      
      NO_DOC=bug fix
      
      (cherry picked from commit 4fd2686e)
      4a6ffba1
  8. Aug 10, 2023
  9. Aug 08, 2023
    • Oleg Chaplashkin's avatar
      test: bump test-run to new version · 083b9a5c
      Oleg Chaplashkin authored
      Bump test-run to new version with the following improvements:
      
      - luatest: fix detect tarantool crash at exit [1]
      - Fix bug when lua script name truncated by dot [2]
      - Raise an error and log it if test timeouts are set incorrectly [3]
      - Pin PyYAML version to 5.3.1 [4]
      - Add ability to set path to executable file [5]
      - Migrate tarantoolctl from tarantool repository [6]
      - Fix test-run crash when default server is crashed [7]
      - Disable reproduce content printing [8]
      
      [1] tarantool/test-run@be693d1
      [2] tarantool/test-run@a6405f1
      [3] tarantool/test-run@d34ecb0
      [4] tarantool/test-run@704420e
      [5] tarantool/test-run@0a70001
      [6] tarantool/test-run@ad43d8f
      [7] tarantool/test-run@b31329e
      [8] tarantool/test-run@31f0ced
      
      NO_DOC=test
      NO_TEST=test
      NO_CHANGELOG=test
      
      (cherry picked from commit f4511948)
      083b9a5c
    • Yaroslav Lobankov's avatar
      ci: bump Clang version to 16 in release build LTO testing · 8a42c785
      Yaroslav Lobankov authored
      Run release build LTO testing inside a Docker container created from the
      `tarantool/testing:ubuntu-jammy-clang16` image with Clang 16 installed.
      
      Closes #318
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      (cherry picked from commit 9d0cb54f)
      8a42c785
    • Yaroslav Lobankov's avatar
      ci: bump Clang version to 16 in release build testing · 4e347f55
      Yaroslav Lobankov authored
      Run release build testing inside a Docker container created from the
      `tarantool/testing:ubuntu-jammy-clang16` image with Clang 16 installed.
      
      Closes #317
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      (cherry picked from commit 9134dabd)
      4e347f55
    • Sergey Vorontsov's avatar
      build: change BACKUP_STORAGE URL for static build · 86bc6b2f
      Sergey Vorontsov authored
      NO_DOC=build
      NO_TEST=build
      NO_CHANGELOG=build
      
      (cherry picked from commit bb74d6c9)
      86bc6b2f
    • Kirill Yukhin's avatar
      Add owners for /.test.mk and /.github · 31a74698
      Kirill Yukhin authored
      Add code owners for CI-related script and
      for github automation directory.
      
      NO_CHANGELOG=no code changes
      NO_TEST=no code changes
      NO_DOC=no code changes
      
      (cherry picked from commit 9234763a)
      31a74698
    • Kirill Yukhin's avatar
      Add owners for test/ and test-run/ · 32ff5a73
      Kirill Yukhin authored
      In order to improve tests of Tarantool core
      assign dedicated team to perform review of each
      and every change.
      
      NO_CHANGELOG=no code changes
      NO_TEST=no code changes
      NO_DOC=no code changes
      
      (cherry picked from commit 532bada7)
      32ff5a73
    • Kirill Yukhin's avatar
      Add CODEOWNERS file · 0beee753
      Kirill Yukhin authored
      To make changelog preparation less stressful let's pass each and every
      change to changelogs/ directly through the doc team.
      
      NO_CHANGELOG=no code changes
      NO_TEST=no code changes
      NO_DOC=no code changes
      
      (cherry picked from commit 2970bd57)
      0beee753
    • Aleksandr Lyapunov's avatar
      box: forbid foreign keys for incompatible temp/local spaces · 23cea1df
      Aleksandr Lyapunov authored
      There must be a couple of rules:
      * foreign key from non-temporary space to temporary space must be
        forbidden since after restart all existing links will be broken.
      * foreign key from non-local space to local space must be forbidden
        on any replica all existing can be broken.
      
      This patch implements the rules.
      
      Closes #8936
      
      NO_DOC=bugfix
      
      (cherry picked from commit 7d23b339)
      23cea1df
  10. Aug 07, 2023
    • Aleksandr Lyapunov's avatar
      box: loose truncate check in case of foreign key · fec86b65
      Aleksandr Lyapunov authored
      In #7309 a truncation of a space that was referenced by foreign
      key from some other space was prohibited.
      
      It appeared that this solution is too bothering since a user can't
      truncate a space even if he truncated referring space before that.
      
      Fix it by allowing space truncate if referring spaces are empty.
      Also allow drop of the primary index in the same case with the
      same reason: logically the index along with all space data is
      not needed for consistency if there's no referring data.
      
      Note that by design space truncate is implemented quite similar
      to space drop. Both delete all indexes, from secondary to primary.
      Since this patch allows deletion of the primary index (which is
      the action that actually deletes all data from the space), this
      patch changes the result of space drop too: the space remains
      alive with no indexes, while before this patch it remained alive
      with no secondary indexes but with present primary. In both cases
      the behaviour is quite strange and must be fixed in #4348. To
      make tests pass I had to perform drop in box.atomic manually.
      
      Closes #8946
      
      NO_DOC=bugfix
      
      (cherry picked from commit 983a7ec2)
      fec86b65
    • Vladimir Davydov's avatar
      test: increase max fiber slice for box/before_replace · a7dbc83a
      Vladimir Davydov authored
      The test fails on osx_debug quite frequently with the following error:
      
      NO_WRAP
      > box/before_replace.test.lua                                     [ fail ]
      >
      > Test failed! Result content mismatch:
      > --- box/before_replace.result	Mon Aug  7 10:36:06 2023
      > +++ /tmp/t/rejects/box/before_replace.reject	Mon Aug  7 10:42:03 2023
      > @@ -899,6 +899,7 @@
      >  ...
      >  for i = 1,17 do gen_inserts() end
      >  ---
      > +- error: fiber slice is exceeded
      >  ...
      >  test_run:cmd('restart server test')
      >  s = box.space.test_on_schema_init
      > @@ -906,7 +907,7 @@
      >  ...
      >  s:count()
      >  ---
      > -- 1
      > +- 0
      >  ...
      >  -- For this test the number of invocations of the before_replace
      >  -- trigger during recovery multiplied by the amount of return values
      > @@ -921,7 +922,8 @@
      >  -- the value is only increased by 1, and this change is visible only in memory.
      >  s:get{1}[2] == 1 + 16999 + 17000 + 1 or s:get{1}[2]
      >  ---
      > -- true
      > +- error: '[string "return s:get{1}[2] == 1 + 16999 + 17000 + 1 o..."]:1: attempt to
      > +    index a nil value'
      >  ...
      >  test_run:cmd('switch default')
      >  ---
      NO_WRAP
      
      Let's try to increase the max fiber slice up to 15 seconds to avoid
      that, like we do in other potentially long tests. (The default value
      is 1 second.)
      
      NO_DOC=test fix
      NO_CHANGELOG=test fix
      
      (cherry picked from commit 371d4110)
      a7dbc83a
    • Vladimir Davydov's avatar
      memtx: assert that space is not NULL in index_read_view_create · d4213e06
      Vladimir Davydov authored
      This should suppress the following coverity issues:
      
      https://scan7.scan.coverity.com/reports.htm#v39198/p13437/fileInstanceId=146712118&defectInstanceId=18978766&mergedDefectId=1563095
      https://scan7.scan.coverity.com/reports.htm#v39198/p13437/fileInstanceId=146712113&defectInstanceId=18978750&mergedDefectId=1563094
      
      While we are at it, let's use space_by_id instead of space_cache_find
      because read view creation is a rare operation affecting all spaces so
      caching the last space by id doesn't make any sense.
      
      NO_DOC=code health
      NO_TEST=code health
      NO_CHANGELOG=code health
      
      (cherry picked from commit f2886dd0)
      d4213e06
  11. Aug 04, 2023
    • Igor Munkin's avatar
      asan: enable ASan and LSan support for LuaJIT back · e987aedb
      Igor Munkin authored
      All LuaJIT related LSan warnings were suppressed in the scope of the
      commit 985548e4 ("asan: suppress all
      LSAN warnings related to LuaJIT"), since all compiler flags tweaks were
      enclosed in LuaJIT CMake machinery. As a result of the commit in LuaJIT
      submodule tarantool/luajit@a86e376 ("build: introduce LUAJIT_USE_ASAN
      option") ASan and LSan support has been finally added to LuaJIT runtime,
      so it was decided to remove LSan suppressions for LuaJIT functions.
      Unfortunately, it was not so easy as it looked like.
      
      At first, Lua global state is not closed properly at Tarantool instance
      exit (see <tarantool_free> in src/main.cc and <tarantool_lua_free> in
      src/lua/init.c for more info), so LSan false-positive leaks are detected
      (for more info, see #3071). Hence, the original LSan suppression for
      lj_BC_FUNCC is returned back (temporarily) until the aforementioned
      issue is not resolved.
      
      Furthermore, the internal LuaJIT memory allocator is not instrumented
      yet, so to find any memory faults it's worth building LuaJIT with system
      provided memory allocator (i.e. enable LUAJIT_USE_SYSMALLOC option).
      However, again, since Tarantool doesn't finalize Lua universe the right
      way, so running Tarantool testing routine with LUAJIT_USE_SYSMALLOC
      enabled generates false-positive LSan leaks. Return back here to enable
      LUAJIT_USE_SYSMALLOC, when #3071 is resolved.
      
      Last but not least, the default value of fiber stack size is 512Kb, but
      several tests in test/PUC-Rio-Lua-5.1-test suite in LuaJIT submodule
      (e.g. some cases with deep recursion in errors.lua or pm.lua) have
      already been tweaked according to the limitations mentioned in #5782,
      but the crashes still occur while running LuaJIT tests with ASan support
      enabled. Experiments once again confirm the notorious quote that "640 Kb
      ought to be enough for anybody".
      
      Anyway, LuaJIT tests are added to <test-release-asan> target in .test.mk
      and LUAJIT_TEST_ENV is extended with required ASan and LSan options.
      
      Follows up #5878
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      (cherry picked from commit bacf4e56)
      e987aedb
  12. Aug 02, 2023
    • Igor Munkin's avatar
      luajit: bump new version · cddf86ba
      Igor Munkin authored
      * ci: introduce testing workflow with sanitizers
      * build: introduce LUAJIT_USE_ASAN option
      * test: introduce test:done TAP helper
      * memprof: remove invalid assertions
      * ci: clean up workflow for exotic builds
      
      Closes #5878
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      NO_CHANGELOG=LuaJIT submodule bump
      cddf86ba
Loading