- Aug 29, 2023
-
-
Oleg Chaplashkin authored
Bump test-run to new version with the following improvements: - Fix non-supported character in log file name [1] - luatest: bump luatest to 0.5.7-43-g251b35f [2] - luatest: bump luatest to 0.5.7-44-g2d51155 [3] [1] tarantool/test-run@c8465a5 [2] tarantool/test-run@e84fd00 [3] tarantool/test-run@22951e0 NO_DOC=test NO_TEST=test NO_CHANGELOG=test (cherry picked from commit 6c825cb7)
-
- Aug 28, 2023
-
-
Nikolay Shirokovskiy authored
Fiber flags are initialized after fiber stack creation. As result currently check for custom stack in fiber_stack_watermark_create does not work. This leads to heap-buffer-overflow on putting watermark if custom stack size is less than FIBER_STACK_SIZE_WATERMARK. Close #9026 NO_DOC=bugfix (cherry picked from commit 750e4890)
-
Nikolay Shirokovskiy authored
`msg` is used after it is freed in iproto_msg_delete. Close #9037 NO_TEST=tested by ASAN NO_DOC=bugfix (cherry picked from commit 4916389a)
-
- Aug 25, 2023
-
-
Nikolay Shirokovskiy authored
When fiber region is freed/destroyed and ENABLE_BACKTRACE is set then `fiber_on_gc_truncate` callback is called. At this time both `used` argument and `fiber->gc_initial_size` are equal to 0. Thus `fiber->first_alloc_bt` is accessed which is already freed. With a bad luck freeing fiber region can put slab back into slab arena. So writing after free can change memory used by another thread. Closes #9020 NO_TEST=tested by ASAN NO_DOC=bugfix (cherry picked from commit c480a867)
-
Sergey Bronnikov authored
Commit f14cb97d ("ci: update paths in a fuzzing workflow") breaks fuzzing workflow because one may only define one of `paths` and `paths-ignore` for a single event. The patch fixes that. NO_CHANGELOG=ci NO_DOC=ci NO_TEST=ci (cherry picked from commit a6eeec3c)
-
Ilya Verbin authored
`*type_out` was set to uninitialized value for `field->type == MP_EXT`. This was introduced by commit 9f9142d6 ("box: cleanup on tuple encoding failure") Closes #9023 NO_DOC=bugfix NO_CHANGELOG=not user-visible (cherry picked from commit bbfaef3b)
-
Mergen Imeev authored
The maximum length of box.cfg{} string parameters is now 512 instead of 256 before. NO_DOC=no need to document NO_TEST=will be added in EE (cherry picked from commit f5511d45)
-
Vladimir Davydov authored
Just to demonstrate that the format argument of ok/is/isnt macros is now optional. NO_DOC=test NO_CHANGELOG=test (cherry picked from commit e13f2bf5)
-
Vladimir Davydov authored
It's really annoying to add a message after each check in a unit test. Let's make this optional. If the message is omitted, "line %d" will be used instead. Also, let's print the expression on failure because it may be useful if exact sources are unavailable. NO_DOC=refactoring NO_CHANGELOG=refactoring (cherry picked from commit 62ae8bf3)
-
Vladimir Davydov authored
The ok/is/isnt macros expand to {} so they may be used without a trailing semicolon. This is going to be fixed so let's add missing semicolons. NO_DOC=code cleanup NO_CHANGELOG=code cleanup (cherry picked from commit 4871b697)
-
Vladimir Davydov authored
There's no need to duplicate all unit test helpers for TAP compatible tests. The only difference between them is that plan() prints the TAP version so let's do just that. NO_DOC=code cleanup NO_CHANGELOG=code cleanup (cherry picked from commit a235080c)
-
Nikita Zheleztsov authored
The test checks, whether the instance notices leader hang during sync. For that it stops server2 and generates some data on the master (server1). The problem is, when connection to server3 flakes, server1 resigns and becomes read only due to fencing enabled. Let's disable fencing for this test, as we don't want automatic leader resigning here. Closes tarantool/tarantool-qa#325 NO_CHANGELOG=test NO_DOC=test (cherry picked from commit 44a6821f)
-
- Aug 24, 2023
-
-
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)
-
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)
-
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)
-
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)
-
- Aug 22, 2023
-
-
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)
-
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)
-
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)
-
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)
-
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)
-
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)
-
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)
-
- Aug 21, 2023
-
-
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 authored
Also, remove RC-related changelog and unreleased/ entries. NO_DOC=no code changes NO_TEST=no code changes NO_CHANGELOG=no code changes
-
- Aug 17, 2023
-
-
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
-
- Aug 16, 2023
-
-
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
-
Sergey Bronnikov authored
NO_DOC=seed corpus NO_CHANGELOG=seed corpus NO_TEST=seed corpus (cherry picked from commit 4894863e)
-
Sergey Bronnikov authored
NO_DOC=testing NO_CHANGELOG=testing (cherry picked from commit 4deadeb8)
-
Sergey Bronnikov authored
NO_DOC=seed corpus NO_CHANGELOG=seed corpus NO_TEST=seed corpus (cherry picked from commit 4b5fb953)
-
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)
-
- Aug 15, 2023
-
-
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)
-
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)
-
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
-
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)
-
- Aug 14, 2023
-
-
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)
-
- Aug 10, 2023
-
-
Ilya Verbin authored
Pin in cache the collation identifiers that are referenced by space format and/or indexes, so that they can't be deleted. Closes #4544 NO_DOC=bugfix (cherry picked from commit d69aa687)
-
Ilya Verbin authored
It was possible to delete a collation, which is in use by a key_def. Part of #4544 NO_DOC=bugfix NO_CHANGELOG=next commit (cherry picked from commit 07beb340)
-
Magomed Kostoev authored
Since number type was introduced we can not assume if tuples are equal by comparison then their sizes are equal too. So the place the assumption is used is fixed. Closes #8899 NO_DOC=bugfix (cherry picked from commit f4de9faf)
-
- Aug 08, 2023
-
-
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)
-