- Apr 10, 2023
-
-
Georgy Moiseev authored
Rework "running tests with built-in package" assert since now checks is a callable table package with subpackages instead of a single function. NO_DOC=No tagged version since checks initial embedding NO_CHANGELOG=No tagged version since checks initial embedding (cherry picked from commit a8bc6312)
-
- Mar 24, 2023
-
-
Georgy Moiseev authored
tarantool/metrics [1] is a lua module (distributed as a separate rock) for metrics aggregation and export. After this patch, it will be a part of the tarantool binary. 1. https://github.com/tarantool/metrics Part of #7725 @TarantoolBot document Title: embedded metrics Now tarantool has metrics module on its board. metrics is a lua module previously distributed as a separate rock which is widely used by tarantool applications. Metrics has its own documentation section: https://www.tarantool.io/en/doc/latest/book/monitoring/ , but it doesn't yet mention anything about the embedding. (cherry picked from commit 82ebbb35)
-
- Mar 11, 2023
-
-
Igor Munkin authored
* ARM64: Avoid side-effects of constant rematerialization. * ARM64: Fix {AHUV}LOAD specialized to nil/false/true. * ARM64: Fix pcall() error case. * Fix math.min()/math.max() inconsistencies. * test: add test case for math.modf Closes #6163 Part of #8069 Follows up #7230 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
- Mar 03, 2023
-
-
Sergey Bronnikov authored
Updated third_party/zstd submodule from v1.5.2 to pre-1.5.5 version. The new version fixes a rare bug that was introduced in 1.5.0 [1]. A v1.5.5 release version will be produced in March. 1. https://github.com/facebook/zstd/pull/3517 Fixes #8391 NO_DOC=build NO_TEST=build (cherry picked from commit ecbbc925)
-
Igor Munkin authored
* ci: add nojit flavor for exotic builds * test: fix lua-Harness JIT-related tests * test: adjust JIT-related tests in tarantool-tests * build: fix build with JIT disabled * Minor fixes. NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump NO_CHANGELOG=test
-
- Mar 01, 2023
-
-
Igor Munkin authored
* test: make skipcond helper more convenient * test: introduce test:skiprest TAP helper * test: introduce test:skipall TAP helper * test: stop using utils.selfrun in tests * ci: use LuaJIT-test target in testing workflows NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump NO_CHANGELOG=test
-
- Feb 27, 2023
-
-
Boris Stepanenko authored
Updating libcurl from 7.84.0 to 7.87.0 in commit 09f4eca1 ("third_party: update libcurl from 7.84.0 to 7.87.0") made it impossible to built tarantool with bundled curl with nghttp2, because nghttp2 was not updated to fit libcurl 7.87.0, this led to missing function nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation during linking step. https://github.com/nghttp2/nghttp2/releases/tag/v1.52.0 Closes #8268 NO_DOC=there is no known behavior changes, consider the change as not visible for a user NO_TEST=can only reproduce in specific environment NO_CHANGELOG=see NO_DOC (cherry picked from commit a6fae421)
-
- Feb 20, 2023
-
-
Timur Safin authored
Added `-d` option for activation of debugger shell: - it calls debugger shell in `luadebug.lua` instead of a standard interactive shell from `console.lua`; - that option complements original way for starting a debugging shell via `require 'luadebug'()`, but is a little bit easier. NB! At the moment when we enter debugging mode instead of a standard Tarantool console, we change banner to: ``` Tarantool debugger 2.11.0-entrypoint-852-g9e6ed28ae type 'help' for interactive help ``` Part of #7456 @TarantoolBot document Title: Command-line option `-d` for console debugger. Please see third_party/lua/README-luadebug.md for a full description of different ways to activate debugging shell.
-
Igor Munkin authored
* ci: add LUAJIT_ENABLE_CHECKHOOK for exotic matrix * ci: add ARM64 architecture to exotic testing * ci: update action/checkout to v3 * Fix os.date() for wider libc strftime() compatibility. * x86/x64: Fix loop realignment. * ci: introduce workflow for exotic builds * sysprof: fix interval parsing in dual-number mode * test: add test for `string.format('%c', 0)` * ci: drop obsolete arguments for LuaJIT integration Part of #8069 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
Timur Safin authored
We used to "normalize" breakpoint filename paths down to their basic name, which worked fine for unique file names, but is getting annoying when you need to debug a code in one of many `init.lua` modules, i.e. break init.lua:5 Will stop at _every_ `init.lua` file we will run at the debugging session. So we add machinery for partial paths lookup, to make possible to set breakpoints using (unique-enough) path suffixes, e.g. if we have multiple `init.lua` in the application, i.e. ./init.lua ./A/init.lua ./B/init.lua Then we could use syntax: break A/init.lua:5 To activate debugger breakpoint only in the particular module, and not trigger it elsewhere. Current suffix trees limitations and peculiarities -------------------------------------------------- Please keep in mind that suffix-tree algorithm, used for partial paths lookup, uses `$ref` and `$f` node names for their own purposes. That means that it would not handle well breakpoints with paths containing `$f` and `$ref`. That's not a big problem given that majority of filesystems we are running on do not usually allow `$` as part of file name. Also, due to suffix tree lookup behavior, if we would activate multiple breakpoints: break init.lua:10 break A/init.lua:10 Then _least specific_ `init.lua:10` breakpoint will trigger. From users' prospective it makes no much difference, as we need to stop in debugger shell in this line, but this is the way how suffix tree is working. Dot files treatment ------------------- There is a special mechanism for `.` and `..` treatment if they are at the header of a path provided. I.e. break ./main.lua:10 break ../a/b/c/least.lua:15 For these cases `.` and `..` will be converted to the full path to the given file location. NO_TEST=hard to implement tests. Postponed till step.5 @TarantoolBot document Title: Breakpoints in console debugger for Lua Match partial path patterns in breakpoints ========================================== Please see `third_party/lua/README-luadebug.md` for a fuller description of partial path syntax one could use in a breakpoints definition.
-
Timur Safin authored
We used to "normalize" breakpoint filename paths down to their basic name, which worked fine for unique file names, but is getting annoying when you need to debug a code in one of many `init.lua` modules, i.e. break init.lua:5 Will stop at _every_ `init.lua` file we will run at the debugging session. So we add machinery for partial paths lookup, to make possible to set breakpoints using (unique-enough) path suffixes, e.g. if we have multiple `init.lua` in the application, i.e. ./init.lua ./A/init.lua ./B/init.lua Then we could use syntax: break A/init.lua:5 To activate debugger breakpoint only in the particular module, and not trigger it elsewhere. NB! If we will activate multiple breakpoints: break init.lua:10 break A/init.lua:10 Then _least specific_ `init.lua:10` breakpoint will trigger. From users' prospective it makes no much difference, as we need to stop in debugger shell in this line, but this is the way how suffix tree is working. NO_TEST=hard to implement tests. Postponed till step.5 @TarantoolBot document Title: Breakpoints in console debugger for Lua Match partial path patterns in breakpoints ========================================== Please see `third_party/lua/README-luadebug.md` for a fuller description of partial path syntax one could use in a breakpoints definition.
-
Timur Safin authored
* Added breakpoints support in debugger; NO_TEST=documentation added @TarantoolBot document Title: Breakpoints in console debugger for Lua Breakpoints support =================== Please see `third_party/lua/README-luadebug.md` for a description of breakpoints support introduced to the builtin console debugger in `luadebug.lua`.
-
Timur Safin authored
Commonize mechanism activated by `dbg.cfg.auto_where` and an automatic code listing we show for breakpoint context. Make sure we do not show redundant listing, i.e. after commands `where #`, or `up`, or `down` we do not output automatic listing, as there was already shown some different context. NO_DOC=see later NO_CHANGELOG=internal NO_TEST=internal
-
Timur Safin authored
Make message, which is shown for a `help` command, to be more readable. NO_DOC=see later commit NO_CHANGELOG=internal NO_TEST=internal
-
Timur Safin authored
Introduced `dbg_write_error` to centralize the way how errors reported in debugger shell. Similarly `dbg_write_warn` is used for reporting of highlighted non-fatal warnings. NO_DOC=internal NO_CHANGELOG=internal
-
Timur Safin authored
We may use "caret" or "arrow" symbols either in colored or uncolored contexts. To reduce further confusion we get rid of colored prefixes. NO_DOC=internal NO_CHANGELOG=internal NO_TEST=internal
-
Timur Safin authored
In many cases we do not need to use all "Snl" parameters in `debug.getinfo()`: so try to trim wherever possible "n", which is calculating `name` and `namewhat`, and "S" which is generating `source`, `short_src` and others. NO_DOC=internal NO_CHANGELOG=internal NO_TEST=internal
-
Timur Safin authored
Visualize properly locations with breakpoints saved there. In addition to current line visualization (using green '=>') we annotate corresponding line with red "●". NO_TEST=see the later commit NO_DOC=internals NO_CHANGELOG=internals
-
Timur Safin authored
Introduced few new commands to handle breakpoints: - `b file:NNN` to set new breakpoint; - `bd file:NNN` to remove breakpoint; - 'bl` to list all active breakpoints. There is partial breakpoint notation supported when for `b :N` or `b +N` breakpoint will be set to the asked line in the _currently_ debugged file. Changed `c` (continue) to stop on breakpoints, if there any active one asssigned by user. Otherwise it still run in full speed, without any hook check. NO_DOC=see the later commit NO_CHANGELOG=see the later commit
-
Timur Safin authored
Historically luadebug.lua used `up` and `down` in a strange order which was inherited from original debugger.lua implementation. But that was counter intuitive, and is confusing. Swap their meaning to be more compatible with that we accustomed in `gdb`/`lldb`. NO_DOC=internal
-
- Feb 15, 2023
-
-
Vladimir Davydov authored
The YAML serializer fails to detect aliases in objects returned by the __serialize method: tarantool> x = {} --- ... tarantool> {a = x, b = x} --- - a: &0 [] b: *0 ... tarantool> setmetatable({}, { > __serialize = function() return {a = x, b = x} end, > }) --- - a: [] b: [] ... Fix this by scanning the object returned by the __serialize method (called by luaL_checkfield) for references. Closes #8240 NO_DOC=bug fix
-
Vladimir Davydov authored
The YAML format supports aliasing - if the same object is referenced more than once, it will be encoded in one places with other places being turned to references: tarantool> x = {} --- ... tarantool> {a = x, b = x} --- - a: &0 [] b: *0 ... This feature is useful for dumping a space list (e.g. box.space) to the console, because each space is referenced by name and id. However, it doesn't work if the referenced object implements the __serialize method: tarantool> x = setmetatable({}, { > __serialize = function() return {} end, > }) --- ... tarantool> {a = x, b = x} --- - a: [] b: [] ... This happens because we check for aliases in dump_array and dump_table (with get_yaml_anchor), after calling the __serialize method via luaL_checkfield. Since the __serialize method may (and usually does) return a different object on each invocation, aliases aren't detected. Let's fix it by calling alias detection (get_yaml_anchor) before luaL_checkfield and passing the anchor to dump_table/dump_array. Needed for https://github.com/tarantool/tarantool-ee/issues/221 Part of #8240 NO_DOC=bug fix NO_CHANGELOG=next commit
-
- Feb 14, 2023
-
-
Georgy Moiseev authored
tarantool/checks [1] is a lua module (distributed as a separate rock) for function input validation. After this patch, it will a part of the tarantool binary. 1. https://github.com/tarantool/checks Closes #7726 Needed for #7725 @TarantoolBot document Title: embedded checks Now tarantool has checks module on its board. checks is a lua module previously distributed as a separate rock which is widely used by many other tarantool lua modules (like cartridge, metrics and crud) and tarantool applications. checks has its own repo with README covering its API usage: https://github.com/tarantool/checks/blob/master/README.md .
-
- Feb 08, 2023
-
-
Vladimir Davydov authored
This commit adds the json_escape_forward_slash variable and a tweak for it that is now used by the compat module. The new variable configures whether '/' is escaped when encoded in JSON. Note, the old implementation was quite messy so we had to rework it: - Drop luaL_serializer::encode_escape_forward_slash. This was an undocumented serializer option implemented only by the JSON serializer and used only by the compat module. Now, we use the json_escape_forward_slash global tweak for all JSON serializers instead, because making this tweak configurable per serializer doesn't make much sense. - Don't use mp_char2escape for escaping JSON characters. Historically, we used this table defined in libmsgpuck in the json_escape utility function. It equals the escape table used by the JSON encoder so it looks more reasonable to use the JSON encoder escape table in json_escape. This commit moves the JSON encoder escape table to util.c and adds an inline utility function json_escape_char which is now used by the JSON encoder and json_escape. - Drop an extra JSON escape table with '/' escaped. We had two escape tables in JSON, one with escaped '/' and another with unescaped '/'. Duplicating tables like this is error-prone and ugly. Let's use one table with '/' unescaped and check the json_escape_forward_slash flag in json_escape_char instead. The cost of this check is negligible performance-wise. This commit also drops the lua/compat.c source file, because it isn't used anymore. While we are at it, remove any mentions of MsgPack from the changelog entry for the json_escape_forward_slash compat option, because it isn't relevant anymore. Closes #8117 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
Vladimir Davydov authored
This commits adds the yaml_pretty_multiline variable and a tweak for it that is now used by the compat module. The new variable configures whether all multiline strings are encoded in the block scalar style or only those that contain a '\n\n' substring. Part of #8117 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
-
- Jan 23, 2023
-
-
Sergey Bronnikov authored
Changelog: https://curl.se/changes.html#7_87_0 New release contains fixes for 7 security problems [1]: https://curl.se/docs/CVE-2022-35252.html https://curl.se/docs/CVE-2022-32221.html https://curl.se/docs/CVE-2022-35260.html https://curl.se/docs/CVE-2022-42915.html https://curl.se/docs/CVE-2022-42916.html https://curl.se/docs/CVE-2022-43551.html https://curl.se/docs/CVE-2022-43552.html Patch adds a new option ENABLE_WEBSOCKETS defined in curl build infrastructure with it's default value used in 7.87.0. 1. https://curl.se/docs/releases.html NO_DOC=libcurl submodule bump NO_TEST=libcurl submodule bump Closes #8150
-
- Jan 17, 2023
-
-
Igor Munkin authored
* ci: use strategy matrix for integration workflow * ci: change runner dispatch for LuaJIT testing NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump NO_CHANGELOG=ci
-
- Jan 12, 2023
-
-
Georgiy Lebedev authored
Since the fiber function is not expected to return (i.e., the inline assembly is not expected to return), remove the dummy memory operand used to indicate that the memory pointed to by the inline assembly pointer operand is clobbered. Closes #8125 NO_DOC=build diagnostic NO_CHANGELOG=build diagnostic NO_TEST=build diagnostic
-
- Jan 11, 2023
-
-
Igor Munkin authored
* cmake: introduce CheckUnwindTables helper * x64/LJ_GC64: Fix type-check-only variant of SLOAD. * LJ_GC64: Fix ir_khash for non-string GCobj. * gdb: support full-range 64-bit lightuserdata Relates to #6481 Part of #7230 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
- Dec 12, 2022
-
-
Vladimir Davydov authored
Not used anywhere anymore. No need in it, because SHA1 is provided by the OpenSSL library. Closes #7987 NO_DOC=code cleanup NO_TEST=code cleanup NO_CHANGELOG=code cleanup
-
- Dec 09, 2022
-
-
Gleb Kashkin authored
Added tarantool.compat option that allows yaml.encode() to encodes all strings containing a newline in a more convenient block scalar style. This is a breaking change, programs that rely on precise lyaml encoding may fail if the new behavior is selected. Closes #3012 Requires #7060 Requires #8007 @TarantoolBot document Title: YAML formatter improvement Now yaml.encode() can encode strings with a newline in block scalar style, see https://yaml.org/spec/1.2-old/spec.html#style/block/literal and https://github.com/tarantool/tarantool/wiki/compat%3Ayaml_pretty_multiline old: ``` tarantool> compat.yaml_pretty_multiline = 'old' --- ... tarantool> return "Title: xxx\n- Item 1\n- Item 2\n" --- - 'Title: xxx - Item 1 - Item 2 ' ... ``` new: ``` tarantool> compat.yaml_pretty_multiline = 'new' --- ... tarantool> return "Title: xxx\n- Item 1\n- Item 2\n" --- - | Title: xxx - Item 1 - Item 2 ... ```
-
Gleb Kashkin authored
For unknown reason in upstream lua_cjson '/' was escaped while according to the standard [rfc4627] it is unnecessary and is questionably compatible with other implementations. It was decided that the change will be introduced using tarantool.compat (gh-7000). The patch adds json_escape_forward_slash option to compat and its logic in lua_cjson and msgpuck. Requires #7060 Requires #8007 Fixes #6200 See also #7000 @TarantoolBot document Title: new compat option json_escape_forward_slash In the new behavior forward slash is not escaped in `json.encode()` and msgpack: ``` tarantool> compat.json_escape_forward_slash = 'new' --- ... tarantool> json.encode('/') --- - '"/"' ... tarantool> compat.json_escape_forward_slash = 'old' --- ... tarantool> json.encode('/') --- - '"\/"' ... ```
-
- Dec 07, 2022
-
-
Igor Munkin authored
* Fix narrowing of unary minus. * Don't compile math.modf() anymore. * OSX/ARM64: Fix external unwinding. * Fix build with busybox grep. * BSD: Fix build with BSD grep. * OSX/ARM64: Disable unwind info. * ARM64: Reorder interpreter stack frame and fix unwinding. * OSX/ARM64: Disable external unwinding for now. * OSX: Fix build by hardcoding external frame unwinding. * Cleanup and enable external unwinding for more platforms. * test: remove TAP side effects in getmetrics tests * test: relax JIT setup in misc.getmetrics test * test: relax JIT setup in lj-430-maxirconst test * GC64: enable sysprof support Closes #6096 Closes #6976 Closes #7919 Relates to #781 Relates to #7762 Part of #7230 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
- Dec 05, 2022
-
-
Nikolay Shirokovskiy authored
Now we base on some unreleased state of libunwind. This is by itself not a good practice. Yet the main motivation is that in the current version of libunwind fast path for backtrace detection on x86_64 does not work. I guess this is because of libunwind/libunwind@400b3f819ad4 (" x86_64: Stop aliasing RSP and CFA"). See libunwind/libunwind#440. Fortunately this commit is not present it the latest release. Using fast or slow path has a great impact on performance of debug build where collecting fiber gc allocation backtrace is turned on by default. It surely depends on frequency and pattern of allocation. Test sql/delete3 depends on backtrace performance most dramatically. On some installations collecting backtraces slowed down the test up to 10 times. If fast path is available then collecting backtrace does not affect performance in a noticeable way. I propose not to keep autotools products in the libunwind fork repo as it is done previously. LOG_CONFIGURE is removed because it somehow incompatible with using && in CONFIGURE_COMMAND command and not critical to the build. Also add autotools build dependencies for packpack package specs. Currently not all packpack images have autotools preinstalled so this is required for build to success. Anyway we'b better have precise build requirements in build specs. Follow-up #5665 NO_DOC=internal NO_TEST=internal NO_CHANGELOG=internal
-
- Nov 23, 2022
-
-
Igor Munkin authored
* Ensure correct stack top for OOM error message. * x86/x64: Check for jcc when using xor r,r in emit_loadi(). * Save trace recorder state around VM event call. * Fix io.close() error message. * Fix io.close(). * Cleanup math function compilation and fix inconsistencies. Closes #3840 Closes #6782 Part of #7230 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
- Nov 15, 2022
-
-
Ilya Verbin authored
Currently AArch64 version of coro_transfer stores x19-x30 and d8-d15 registers to the stack, but only after that it updates the stack pointer. If a SIGALRM signal is delivered during the execution of coro_transfer, the signal handler will use the stack starting from current sp, thus corrupting the saved registers. Fix this by updating the stack pointer at the beginning of coro_transfer. x2 register is still required, because `str sp, [x0, #0]` is invalid in the A64 instruction set. Closes #7484 Closes #7523 NO_DOC=bugfix NO_TEST=Hard to create a stable reproducer, mostly covered by existing tests.
-
- Nov 11, 2022
-
-
Igor Munkin authored
* ci: add workflow for legacy CMake GNU Make build * build: fix build with the original Makefile * ci: drop integration for macOS with disabled GC64 * ci: add 'self-hosted' tag to runs-on * ci: use Ninja generator in CI workflows * ci: use CMAKE_EXTRA_PARAMS in LuaJIT integration * test: replace result variable in MakeLuaPath.cmake * ci: merge Linux and macOS workflows * ci: merge x86_64 and ARM64 workflows * ci: remove arch prefix for macOS M1 workflow * ci: remove excess parallel level setup * ci: use out of source build in GitHub Actions * test: fix tarantool suite for out of source build * test: introduce MakeLuaPath.cmake helper * test: introduce utils.profilename helper NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bum NO_CHANGELOG=ci
-
- Nov 09, 2022
-
-
Georgiy Lebedev authored
Fix strict aliasing rules violation by explicitly calling `memcpy`. libev is treated in a special way: -Wstrict-aliasing warning are ignored there, because: 1. libev authors claim that this is a false positive and their code is correct in respect to aliasing rules: see * http://lists.schmorp.de/pipermail/libev/2010q1/000943.html * http://lists.schmorp.de/pipermail/libev/2015q2/002540.html 2. it's a common practice to ignore compiler warning in libev: see * http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#COMPILER_WARNINGS * https://github.com/tarantool/tarantool/blob/dec0e0221e183fa972efa65bb0fb658112f2196f/cmake/BuildLibEV.cmake#L6-L12 Ignoring `-Wstrict-aliasing` for libev using diagnostic pragmas does not work, apparently, due to a bug in GNU: use the `system_header` pragma instead — ignoring all compiler warnings coming from libev is a win-win anyways. Needed for #7862 NO_CHANGELOG=build NO_DOC=build NO_TEST=build
-
- Oct 19, 2022
-
-
Timur Safin authored
At the moment we are not yet compatible with readline support inside of Tarantool console. Diagnose that situation at the moment debugger started and bail out. NO_TEST=interactive NO_DOC=Markdown updated
-
Timur Safin authored
NO_TEST=see it elsewhere Part of #7593 @TarantoolBot document Title: Console debugger for Lua Console debugger luadebug.lua ============================== Module `luadebug.lua` is available as console debugger of Lua scripts. It's activated via: ``` local debugger = require 'luadebug' debugger() ``` Originally we have used 3rd-party code from slembcke/debugger.lua but significantly refactored since then. Currently available console shell commands are: ``` c|cont|continue - continue execution d|down - move down the stack by one frame e|eval $expression - execute the statement f|finish|step_out - step forward until exiting the current function h|help|? - print this help message l|locals - print the function arguments, locals and upvalues n|next|step_over - step forward by one line (skipping over functions) p|print $expression - execute the expression and print the result q|quit - exit debugger s|st|step|step_into - step forward by one line (into functions) t|trace|bt - print the stack trace u|up - move up the stack by one frame w|where $linecount - print source code around the current line ``` Console debugger `luadebug.lua` allows to see sources of builtin Tarantool module (e.g. `@builtin/datetime.lua`), and it uses new function introduced for that purpose `tarantool.debug.getsources()`, one could use this function in any external GUI debugger (i.e. vscode or JetBrains) if need to show sources of builtin modules while they have been debugged. > Please see third_party/lua/README-luadebug.md for a fuller description > of an original luadebug.lua implementation.
-