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

runtime error: subtraction of unsigned offset … overflowed to … in online ALTER TABLE

    XMLWordPrintable

Details

    • Not for Release Notes
    • This should have no bad effects outside WITH_UBSAN=ON builds.

    Description

      I noticed this while checking MDEV-37949 test results. The problem turns out to be older. You will need a recent version of clang (I used 21.1.8) and cmake -DWITH_ASAN=ON -DWITH_UBSAN=ON (ASAN could be important for timing; I did not try without it):

      mysql-test/mtr --rr innodb.innodb-table-online
      rr replay mysql-test/var/log/mysqld.1.rr/latest-trace
      

      10.6 317fb109153b45091003f0b1380b5d68522fce29

      innodb.innodb-table-online '8k,clear'    w3 [ fail ]  Found warnings/errors in server log file!
              Test ended at 2026-01-02 09:01:53
      line
      /mariadb/10.6/storage/innobase/row/row0log.cc:2811:13: runtime error: subtraction of unsigned offset from 0x7b2b56d35000 overflowed to 0x7b2b56da99c9
      

      I started debugging this by setting a breakpoint on __ubsan_handle_pointer_overflow. It is related to an earlier call to row_log_block_allocate().

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              marko Marko Mäkelä
              Marko Mäkelä Marko Mäkelä
              Thirunarayanan Balathandayuthapani Thirunarayanan Balathandayuthapani
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.