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

Table number > MAX_TABLES causes overflow of table_map at main.join test

    XMLWordPrintable

Details

    Description

      Caught by UBSAN:

      /home/buildbot/buildbot/build/mariadb-10.5.28/sql/sql_base.h:357:29: runtime error: shift exponent 64 is too large for 64-bit type 'long long unsigned int'
      

      This happens inside setup_table_map() when tablenr==64 while table->map is a 64-bit integer, so there's an overflow.

      Needs to figure out why there's no error generated when tablenr==MAX_TABLES and optionally add DBUG_ASSERT(tablenr < MAX_TABLES) to setup_table_map() to be able to catch such situations without running UBSAN.

      Attachments

        Issue Links

          Activity

            People

              oleg.smirnov Oleg Smirnov
              oleg.smirnov Oleg Smirnov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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