Skip to content
Snippets Groups Projects
  1. Oct 19, 2022
    • Timur Safin's avatar
      debugger: prevent running from Tarantool REPL · ace88542
      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
      ace88542
    • Timur Safin's avatar
      debugger: console debugger changelog and doc · a2ba5013
      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.
      a2ba5013
    • Timur Safin's avatar
      debugger: correct step_over for unbalanced calls/returns · a8a47a30
      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
      a8a47a30
    • Timur Safin's avatar
      debugger: use NO_COLOR to disable coloring · 1163aa05
      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
      1163aa05
    • Timur Safin's avatar
      debugger: refactor proper initialization · f7a5336c
      Timur Safin authored
      Show debugger header only when repl is called.
      
      NO_TEST=bugfix
      NO_DOC=bugfix
      NO_CHANGELOG=bugfix
      f7a5336c
    • Timur Safin's avatar
      debugger: refactor commands helper · f5a9331e
      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
      f5a9331e
    • Timur Safin's avatar
      debugger: refactor luadebug.lua · f7d90f84
      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
      f7d90f84
    • Timur Safin's avatar
      debugger: cleanup code · e52e283a
      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
      e52e283a
    • Timur Safin's avatar
      debugger: retrieve @builtin/%s.lua sources · e608a737
      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
      e608a737
    • Timur Safin's avatar
      debugger: enable autolisting · 03cb944f
      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
      03cb944f
    • Timur Safin's avatar
      refactor: format luadebug.lua · a04b43c8
      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
      a04b43c8
    • Timur Safin's avatar
      debugger: added luadebug.lua · 3d8086f0
      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
      3d8086f0
  2. Oct 14, 2022
    • Georgiy Lebedev's avatar
      libunwind: bump new version · cc641d3e
      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>
      cc641d3e
  3. Oct 06, 2022
    • Igor Munkin's avatar
      luajit: bump new version · b805d4a3
      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
      b805d4a3
  4. Sep 14, 2022
    • Igor Munkin's avatar
      luajit: bump new version · 60702571
      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
      60702571
  5. Aug 25, 2022
    • Aleksandr Lyapunov's avatar
      Fix a bug in qsort · e1d96170
      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
      e1d96170
  6. Aug 03, 2022
    • Igor Munkin's avatar
      luajit: bump new version · e5bc192a
      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
      e5bc192a
    • Serge Petrenko's avatar
      build: update decNumber library · 89e827bb
      Serge Petrenko authored
      Integrate Matthew Haggerty's patches silencing a bunch of gcc build
      warnings.
      
      NO_DOC=build
      NO_TEST=build
      NO_CHANGELOG=build
      89e827bb
    • Serge Petrenko's avatar
      build: bump bundled c-ares version to 1.18.1 · 344d5735
      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
      344d5735
    • Vladimir Davydov's avatar
      build: bump zstd submodule · ec02a6ad
      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
      ec02a6ad
  7. Aug 02, 2022
  8. Jul 27, 2022
    • Igor Munkin's avatar
      luajit: bump new version · 3214fa04
      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
      3214fa04
  9. Jul 14, 2022
  10. Jul 08, 2022
  11. Jun 30, 2022
    • Igor Munkin's avatar
      luajit: bump new version · 34330b15
      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
      34330b15
  12. Jun 29, 2022
    • Nikolay Shirokovskiy's avatar
      third_party: update nghttp2 from 1.46.0 to 1.47.0 · d06b5f8a
      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
      d06b5f8a
  13. Jun 18, 2022
    • Igor Munkin's avatar
      luajit: bump new version · b1953b59
      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
      b1953b59
  14. Jun 01, 2022
    • Andrey Saranchin's avatar
      replace sigprocmask() with pthread_sigmask() · 50107cf2
      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
      50107cf2
  15. May 25, 2022
    • Timur Safin's avatar
      build: submodule third_party/tz instead of git · 4eaff4e0
      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
      4eaff4e0
  16. May 20, 2022
    • Maxim Kokryashkin's avatar
      luajit: bump submodule · f40ad50d
      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
      f40ad50d
  17. May 19, 2022
  18. Apr 25, 2022
    • Maxim Kokryashkin's avatar
      luajit: bump new version · c6b038b0
      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
      c6b038b0
    • Sergey Bronnikov's avatar
      third_party: update libcurl from 7.76.0 to 7.80.0 · a353ec91
      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
      a353ec91
  19. Apr 22, 2022
    • Igor Munkin's avatar
      luajit: bump new version · 60fe9d14
      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: default avatarIgor Munkin <imun@tarantool.org>
      60fe9d14
    • Mergen Imeev's avatar
      lua: introduce MP_INTERVAL to module msgpack · 38f0c904
      Mergen Imeev authored
      Part of #6773
      
      NO_DOC=INTERVAL has already been introduced earlier.
      NO_CHANGELOG=It will be added in another commit.
      38f0c904
  20. Apr 12, 2022
    • Igor Munkin's avatar
      luajit: bump new version · ad5fd3ae
      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
      ad5fd3ae
  21. Apr 04, 2022
    • Timur Safin's avatar
      datetime, lua: date parsing functions · 3c403661
      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
      3c403661
Loading