Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21167

LF_PINS::stack_ends_here can be inaccurate, leading to alloca() larger than stack

    XMLWordPrintable

    Details

      Description

      lf_pinbox_real_free() tries to allocate some stack to sort the pins, and is using
      LF_PINS::stack_ends_here to do that.

      There is a problem with it however, because LF_PINS::stack_ends_here is from the stack where
      pins were allocated, and this is not necessarily the current thread.
      E.g binlog group commit in Innodb commits multiple transactions that come from multiple THDs in a single function, trx_commit_in_memory/deregister_rw would use LF_PINS allocated
      in another thread.

        Attachments

          Activity

            People

            Assignee:
            wlad Vladislav Vaintroub
            Reporter:
            wlad Vladislav Vaintroub
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: