- 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.
-
Timur Safin authored
Number of 'call' hook invocations is always greater than number of 'return' hook events. (i.e. ffi functions does use `call` but there is no `return`. Same is for builtin functions like `assert` or `error`). We count number of stack frames available, and stop once level is once again less or equal to the necessary one. Math.huge is used to stop on each line (trace mode). NO_CHANGELOG=internal NO_DOC=internal NO_TEST=internal
-
Timur Safin authored
Do not use non-standard DBG_NOCOLOR, but use NO_COLOR [^1] for disabling color output on terminals. [^1]: https://no-color.org/ NO_DOC=later NO_CHANGELOG=internal NO_TEST=internal
-
Timur Safin authored
Show debugger header only when repl is called. NO_TEST=bugfix NO_DOC=bugfix NO_CHANGELOG=bugfix
-
Timur Safin authored
Create command matcher and help map using convenient builder function. Commands described in a form: ``` {'f.inish|step_out', 'step out', cmd_finish}, {'p.rint $expression', 'execute the expression', cmd_print}, ``` where we could introduce multiple aliases, commands with arguments, commands descriptions and function handlers. NO_DOC=internal NO_CHANGELOG=internal NO_TEST=internal
-
Timur Safin authored
- refactor setmetatable usage to be more idiomatic; - get rid of hardcode of `luadebug.lua` and use DEBUGGER instead. It will be necessary later for controlling of a name displayed by shell; - refactor colored output facilities. NO_TEST=refactoring NO_DOC=refactoring NO_CHANGELOG=refactoring
-
Timur Safin authored
Get rid of all irrelevant for the Tarantool code: - branches of code for non-LuaJIT interpreter; - LuaJIT, but Windows-specific code; - luadebug.lua (former debugger.lua) readline functions were incompatible with Tarantool console readline, so disable it entirely; - Also fixed multiple luacheck warnings. NO_DOC=refactoring NO_CHANGELOG=refactoring NO_TEST=refactoring
-
Timur Safin authored
Extend Tarantool kernel internal API with the call `tarantool.debug.getsources()` to allow to retrieve sources of a Tarantool `builtin/*` modules to show them in the debugger shell. Created simple luatest script for checking consistency of a values returned from `require 'tarantool'.debug.getsources()` and an ctual script file content we expected to receive. NO_DOC=see future commit NO_CHANGELOG=see future commit
-
Timur Safin authored
Enable automatical visualization of current context after every next debugger step - so called "autolisting". This supposedly resemble lldb behaviour, which is simplifying debugging in CHUI. NO_DOC=internal NO_CHANGELOG=internal NO_TEST=internal
-
Timur Safin authored
Attempt to better format style of the imported luadebug.lua (formerly known as debugger.lua) NO_DOC=refactoring NO_CHANGELOG=rafactoring NO_TEST=refactoring
-
Timur Safin authored
Use 3rd-party module https://github.com/slembcke/debugger.lua as a basis for our debugger CLI shell, rename it to luadebug.lua to avoid collision with vscode and JetBrains debugger helper scripts. NO_DOC=yet NO_CHANGELOG=yet NO_TEST=yet
-
- Oct 14, 2022
-
-
Georgiy Lebedev authored
libunwind/libunwind@f67ef28 adds the ability for libunwind to unwind a stack where the return address obtained from the AARCH6 link register (x30) has a pointer authentication code (PAC). Needed for #7285 NO_CHANGELOG=<internal submodule version bump> NO_DOC=<submodule version bump> NO_TEST=<submodule version bump>
-
- Oct 06, 2022
-
-
Igor Munkin authored
* FFI: Always fall back to metamethods for cdata length/concat. * FFI: Add tonumber() specialization for failed conversions. * build: introduce LUAJIT_ENABLE_CHECKHOOK option * Fix overflow check in unpack(). * gdb: refactor iteration over frames while dumping stack * gdb: adjust to support Python 2 (CentOS 7) Closes #7458 Closes #7655 Needed for #7762 Part of #7230 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
- Sep 14, 2022
-
-
Igor Munkin authored
* From Lua 5.3: assert() accepts any type of error object. Closes #7457 Part of #7230 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
- Aug 25, 2022
-
-
Aleksandr Lyapunov authored
In commit (35334ca1) qsort was fixed but unfortunately a small typo was introduced. Due to that typo the qsort made its job wrong. Fix the problem and add unit test for qsort. Unfortunately the test right from the issue runs extremely long, so it should go to long-tests. Closes #7605 NO_DOC=bugfix
-
- Aug 03, 2022
-
-
Igor Munkin authored
* Call error function on rethrow after trace exit. * Fix handling of errors during snapshot restore. Part of #7230 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
Serge Petrenko authored
Integrate Matthew Haggerty's patches silencing a bunch of gcc build warnings. NO_DOC=build NO_TEST=build NO_CHANGELOG=build
-
Serge Petrenko authored
Previous version was an intermediate one - 1.15.0-35 The update brings a bunch of CVE fixes: * CVE-2020-14354 fixed in c-ares 1.16.1 * CVE-2020-8277 fixed in c-ares 1.17.0 * CVE-2021-3672 fixed in c-ares 1.17.2 And a bunch of other security fixes NO_DOC=build NO_TEST=build NO_CHANGELOG=build
-
Vladimir Davydov authored
Updated third_party/zstd submodule from v1.5.0 to 1.5.2 version. The new version fixes a few bugs found by fuzzing testing. Note, the new zstd version contains a .S source file so we need to include ASM to the CMake project languages. NO_DOC=build NO_TEST=build
-
- Aug 02, 2022
-
-
Sergey Bronnikov authored
Patch updates libyaml to the version that contains fixes of stack overflows [1]. PR in upstream with original patch: "Avoid recursion in the document loader" [2]. 1. https://github.com/yaml/libyaml/issues/107 2. https://github.com/yaml/libyaml/pull/127 NO_DOC=internal NO_TEST=internal
-
Alexander Turenko authored
This is just regular update to bring bugfixes and improvements in the library into tarantool. https://github.com/nghttp2/nghttp2/releases/tag/v1.48.0 NO_DOC=there is no known behavior changes, consider the change as not visible for a user NO_TEST=there is no specific problem we want to solve and verify here NO_CHANGELOG=see NO_DOC
-
Vladimir Davydov authored
This is a backport of commit https://github.com/postgres/postgres/commit/9d6077abf9d6efd992a59f05ef5aba981ea32096 It's standard for quicksort implementations, after having partitioned the input into two subgroups, to recurse to process the smaller partition and then handle the larger partition by iterating. This method guarantees that no more than log2(N) levels of recursion can be needed. However, Bentley and McIlroy argued that checking to see which partition is smaller isn't worth the cycles, and so their code doesn't do that but just always recurses on the left partition. In most cases that's fine; but with worst-case input we might need O(N) levels of recursion, and that means that qsort could be driven to stack overflow. Such an overflow seems to be the only explanation for today's report from Yiqing Jin of a SIGSEGV in med3_tuple while creating an index of a couple billion entries with a very large maintenance_work_mem setting. Therefore, let's spend the few additional cycles and lines of code needed to choose the smaller partition for recursion. NO_DOC=bug fix NO_TEST=backport
-
Pavel Balaev authored
The current version of Luarocks used in tarantool has a security vulnerability: https://github.com/luarocks/luarocks/pull/1019 This issue is fixed in release 3.1.3, commit: 6ffa8cbe2bcdea2c1ee0f4b32291d179210707b6 Part of https://github.com/tarantool/security/issues/12 NO_DOC=bugfix NO_TEST=bugfix NO_CHANGELOG=bugfix
-
- Jul 27, 2022
-
-
Igor Munkin authored
* test: make sysprof tests more deterministic * test: increase sampling interval in sysprof tests * LJ_GC64: Fix IR_VARG offset for fixed number of results. * sysprof: implement stack sandwich support * symtab: fix .symtab section dump of the executable * sysprof: disable proto and trace dumps in default * ci: introduce GitHub action for environment setup * build: configure parallel jobs * ci: replace hw.ncpu with hw.logicalcpu for macOS * ci: add Tarantool integration testing * ci: remove GC64 matrix entries for ARM64 workflows * ci: fix --parallel argument for MacOS runners Closes #7172 Closes #7244 Closes #7264 Part of #7230 Needed for #7472 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
- Jul 14, 2022
-
-
Ilya Verbin authored
If MP_ERROR contains an error message with invalid UTF-8 sequences, encode it in Base64 to obtain printable string. Closes #6781 Closes #6934 NO_DOC=bugfix
-
- Jul 08, 2022
-
-
Sergey Bronnikov authored
Changelog: https://curl.se/changes.html#7_84_0 New release contains fixes for 4 security problems [1]. Patch adds a new option defined in curl build infrastructure with it's default value used in 7.84.0. NOTE: PSL is a Public Suffix List (PSL), it is a list of suffixes used for cookies. 1. https://curl.se/docs/releases.html NO_DOC=libcurl submodule bump NO_TEST=libcurl submodule bump
-
- Jun 30, 2022
-
-
Igor Munkin authored
* Avoid conflict between 64 bit lightuserdata and ITERN key. * Reorganize lightuserdata interning code. * test: fix path storage for non-concatable objects * ARM64: Fix assembly of HREFK. * FFI/ARM64: Fix pass-by-value struct calling conventions. * test: set DYLD_LIBRARY_PATH environment variable * x64/LJ_GC64: Fix fallback case of asm_fuseloadk64(). * FFI: Handle zero-fill of struct-of-NYI. * Fix interaction between profiler hooks and finalizers. * Flush and close output file after profiling run. * Fix debug.debug() for non-string errors. * Fix write barrier for lua_setupvalue() and debug.setupvalue(). * Fix FOLD rule for strength reduction of widening. * Fix bytecode dump unpatching. * Fix tonumber("-0") in dual-number mode. * Fix tonumber("-0"). * Give expected results for negative non-base-10 numbers in tonumber(). * Add missing LJ_MAX_JSLOTS check. * Add stricter check for print() vs. tostring() shortcut. Closes #6548 Fixes #4614 Fixes #4630 Fixes #5885 Fixes tarantool/tarantool-qa#234 Fixes tarantool/tarantool-qa#235 Follows up #2712 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
- Jun 29, 2022
-
-
Nikolay Shirokovskiy authored
This will fix compilation on recent Archlinux. The issue is this distro installs libbpf in base configuration and nghttp2 1.46.0 tries to compile eBPF code if this library is present and failed if compiler is gcc. Closes #7292 NO_DOC=nghttp2 submodule bump NO_TEST=nghttp2 submodule bump
-
- Jun 18, 2022
-
-
Igor Munkin authored
* ci: add job for build using Ninja on Linux/x86_64 * build: create file lists outside of CMake commands * build: use unique names for CMake targets * Revert "test: disable PUC-Rio tests for several -l options" * ci: make GitHub workflows more CMake-ish * test: adapt PUC-Rio tests for debug line hook * test: adapt PUC-Rio test for tail calls debug info * test: adapt PUC-Rio test with reversed function Closes #5693 Closes #5702 Closes #5782 Follows up #5747 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump NO_CHANGELOG=LuaJIT submodule bump
-
- Jun 01, 2022
-
-
Andrey Saranchin authored
Since the use of sigprocmask() is unspecified in a multithreaded process we should use pthread_sigmask() instead. This patch replaces all the sigprocmask calls with pthread analogue. NO_TEST=refactoring NO_CHANGELOG=refactoring NO_DOC=refactoring
-
- May 25, 2022
-
-
Timur Safin authored
FreeBSD Tarantool port has some problems if build uses cmake' ExternalProject_Add which refers to the github repository. Sumodule works better - so switching to using it. NO_CHANGELOG=build NO_DOC=build NO_TEST=build
-
- May 20, 2022
-
-
Maxim Kokryashkin authored
LuaJIT submodule is bumped to introduce the following changes: * sysprof: change C configuration API * sysprof: enrich symtab on a new trace or a proto * sysprof: fix SYSPROF_HANDLER_STACK_DEPTH * sysprof: make internal API functions static * sysprof: add LUAJIT_DISABLE_SYSPROF to Makefile * symtab: check the _GNU_SOURCE definition Within this changeset Tarantool-specific backtrace handler is introduced and set to be used by sysprof machinery. Besides, all new public Lua C API introduced within this changeset is added to extra/exports. Follows up #781 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump NO_CHANGELOG=LuaJIT submodule bump
-
- May 19, 2022
-
-
Sergey Bronnikov authored
Changelog: https://curl.se/changes.html#7_83_0 Curl replaced prefix CURL_ with CMAKE_ in private identifiers [1] since the 'CMAKE_' prefix is reserved for CMake's own private use, see [2]. Patch adds a number of options defined in curl build infrastructure with their default values used in 7.83.0. 1. https://github.com/curl/curl/commit/9108da2c26d18e927b91e33d3729d9cf0f3eb8fa 2. https://cmake.org/cmake/help/latest/manual/cmake-variables.7.html NO_DOC=libcurl submodule bump NO_TEST=libcurl submodule bump Follows up #6029
-
- Apr 25, 2022
-
-
Maxim Kokryashkin authored
LuaJIT submodule is bumped to introduce the following changes: * GC64: disable sysprof support * build: make -DLUAJIT_DISABLE_SYSPROF work * test: disable sysprof C API tests with backtrace * tools: introduce parsers for sysprof * sysprof: introduce Lua API * memprof: add profile common section * core: introduce lua and platform profiler * memprof: move symtab to a separate module * core: separate the profiling timer from lj_profile * vm: save topframe info into global_State Within this changeset a parser for binary data dumped via the sampling profiler to Tarantool binary. It is a set of the following Lua modules: * sysprof/parse.lua: decode the sampling profiler event stream * sysprof/collapse.lua: collapse stacks obtained while profiling * sysprof.lua: Lua script and module to display data Besides, all new public Lua C API introduced within this changeset is added to extra/exports. Closes #781 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
Sergey Bronnikov authored
Changelog: https://curl.se/changes.html#7_80_0 NO_DOC=libcurl submodule bump NO_CHANGELOG=libcurl submodule bump NO_TEST=libcurl submodule bump Closes: #6029 Closes: https://github.com/tarantool/security/issues/10
-
- Apr 22, 2022
-
-
Igor Munkin authored
LuaJIT submodule is bumped to introduce the following changes: * memprof: enrich symtab with newly loaded symbols * memprof: extend symtab with C symbols Within this changeset the new Lua module providing minimalistic AVL tree implementation required for processing C symbols is introduced: * utils/avl.lua: minimalistic AVL tree implementation Closes #5813 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump Signed-off-by:
Igor Munkin <imun@tarantool.org>
-
Mergen Imeev authored
Part of #6773 NO_DOC=INTERVAL has already been introduced earlier. NO_CHANGELOG=It will be added in another commit.
-
- Apr 12, 2022
-
-
Igor Munkin authored
* memprof: enrich symtab when new trace is compiled * memprof: substitute long proto names with aliases * memprof: enrich symtab when meeting new prototype * memprof: add symbol generations Closes #5815 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump
-
- Apr 04, 2022
-
-
Timur Safin authored
Datetime module provides parse function to create datetime object given input string. `datetime.parse` function expect 1 required argument - which is input string, and set of optional parameters passed as table in 2nd argument. Allowed attributes in this optional table are: * `format` - should be either 'iso8601', 'rfc3339' or `strptime`-like format string. [strptime format will be added as part of next commit]; * `tzoffset` - to redefine offset of input string value, if there is no timezone provided. * `tz` - human-readable, Olson database, timezone identifier, e.g. 'Europe/Moscow'. Not yet implemented in this commit. ``` tarantool> T = date.parse('1970-01-01T00:00:00Z') tarantool> T - 1970-01-01T00:00:00Z tarantool> T = date.parse('1970-01-01T00:00:00', {format = 'iso8601', tzoffset = 180}) tarantool> T - 1970-01-01T00:00:00+0300 tarantool> T = date.parse('2017-12-27T18:45:32.999999-05:00', {format = 'rfc3339'}) tarantool> T - 2017-12-27T18:45:32.999999-0500 ``` Implemented as per RFC https://hackmd.io/@Mons/S1Vfc_axK#%D0%AD%D1%82%D0%B0%D0%BF-3-%D0%9F%D0%B0%D1%80%D1%81%D0%B8%D0%BD%D0%B3-%D0%B4%D0%B0%D1%82-%D0%BF%D0%BE-%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82%D1%83 Part of #6731 NO_DOC=internal NO_CHANGELOG=internal
-