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

UBSAN: runtime error: downcast of address X which does not point to an object of type 'Item_row' in Item_func_in::get_func_row_mm_tree and load of value X, which is not a valid value for type 'geometry_type' on SELECT

    XMLWordPrintable

    Details

      Description

      SET sql_select_limit=1;
      CREATE TABLE t (c1 INT,c2 INT,KEY(c2)) ENGINE=InnoDB;
      INSERT INTO t VALUES (0,0),(0,1);
      SELECT c2 FROM t WHERE (0,c2) in ((0,1),(0,1),(0,2));
      

      Leads to:

      10.9.0 161fd2d29cc2f8390fa3bf7e739c52bc8d5c39df (Optimized)

      /test/10.9_opt_san/sql/opt_range.cc:8144:44: runtime error: downcast of address 0x629000096d00 which does not point to an object of type 'Item_row'
      

      Setup:

      Compiled with GCC >=7.5.0 (I use GCC 9.4.0) and:
          -DWITH_ASAN=ON -DWITH_ASAN_SCOPE=ON -DWITH_UBSAN=ON -DWITH_RAPID=OFF -DWSREP_LIB_WITH_ASAN=ON
      Set before execution:
          export ASAN_OPTIONS=quarantine_size_mb=512:atexit=1:detect_invalid_pointer_pairs=3:dump_instruction_bytes=1:abort_on_error=1
          export UBSAN_OPTIONS=print_stacktrace=1
      

      Bug confirmed present in:
      MariaDB: 10.4.25 (dbg), 10.4.25 (opt), 10.5.16 (dbg), 10.5.16 (opt), 10.6.8 (dbg), 10.6.8 (opt), 10.7.4 (dbg), 10.7.4 (opt), 10.8.3 (dbg), 10.8.3 (opt), 10.9.0 (dbg), 10.9.0 (opt)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.44 (dbg), 10.2.44 (opt), 10.3.35 (dbg), 10.3.35 (opt)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              psergei Sergei Petrunia
              Reporter:
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.