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

Overuse of big stackvariables results in stackoverflows

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5.26, 10.6.19, 10.11.9, 11.4.3
    • 10.5, 10.6, 10.11, 11.4
    • Backup
    • MariaDB 10.11.8
      Alpine Linux 3.20.2

    Description

      Currently, the code relies on big stack buffers for temporary data.
      This leads to stack overflow crashes.

      In my case, on my system, the stack limit is 8192, whereas below, more is requested.

      Example:

      static bool page_is_corrupted(const byte *page, ulint page_no,
                        const xb_fil_cur_t *cursor,
                        const fil_space_t *space)
      {
          byte tmp_frame[UNIV_PAGE_SIZE_MAX];
          byte tmp_page[UNIV_PAGE_SIZE_MAX];
      
      

      Perhaps threadlocal static- or heap buffers should be used instead

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              jbau32 Johannes Baumgarten
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.