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

UBSAN: strings/ctype-mb.c:261:32: runtime error: applying non-zero offset 2 to null pointer main.long_unique_bugs

    XMLWordPrintable

Details

    Description

      # MDEV-39559: Assertion `b` failed in `my_strnncoll_xxxx_nopad_ci`
      #
      SET @old_trx_iso_level := @@session.transaction_isolation;
      SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
      CREATE TABLE t (x TEXT, UNIQUE(x))
      ENGINE=InnoDB
      CHARACTER SET utf8mb3 COLLATE utf8mb3_general_nopad_ci
      SELECT '' AS x;
      DROP TABLE t;
      SET @@session.transaction_isolation = @old_trx_iso_level;
      create table t1 (b text, key(b(10))) engine=myisam
      character set utf8mb3 collate utf8mb3_general_nopad_ci
      select '' as b union all select '0' as b union all select '1' as b;
      select * from t1 force index(b) where b >= '' and b < '2';
      b
       
      0
      1
      drop table t1;
      # End of 11.8 tests
      line
      /home/buildbot/src/strings/ctype-mb.c:261:32: runtime error: applying non-zero offset 2 to null pointer
      SUMMARY: UndefinedBehaviorSanitizer: nullptr-with-nonzero-offset /home/buildbot/src/strings/ctype-mb.c:261:32 
      ^ Found warnings in /dev/shm/normal/10/log/mysqld.1.err
      

      Also my_charpos_mb - the cs argument is definitely used.

      Attachments

        Issue Links

          Activity

            People

              raghunandan.bhat Raghunandan Bhat
              danblack Daniel Black
              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.