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

use-of-uninitialized-value in bcmp

    XMLWordPrintable

Details

    • Can result in hang or crash
    • Q3/2026 Replic. Maintenance

    Description

      Test case is MTR compatiblle

      CHANGE MASTER 'ch_b' TO master_delay=1;
      SET NAMES BINARY;
      SET @@default_master_connection='ch1';
      SET SESSION collation_connection=utf32_icelandic_ci;
      SET SESSION default_master_connection='ch2';
      CHANGE MASTER TO master_use_gtid=slave_pos;
      

      CS 10.11.18 9ed3a7f9f6929aa34420a8616930844d3a35bb91 (Debug, MSAN, Clang 20.1.8-20250708) Build 25/05/2026

      Uninitialized bytes in MemcmpInterceptorCommon at offset 1 inside [0x703000006648, 4)
      ==1269748==WARNING: MemorySanitizer: use-of-uninitialized-value
          #0 0x555555db02ec in bcmp (/test/MSAN_MD250526-mariadb-10.11.18-linux-x86_64-dbg/bin/mariadbd+0x85c2ec) (BuildId: 697e53181c54d24002f39226f37eee72fd74b5e1)
          #1 0x555555e3cbb3 in NAMED_ILINK::cmp(char const*, unsigned long) /test/10.11/sql/keycaches.cc:49:38
          #2 0x555555e3cbb3 in find_named(I_List<NAMED_ILINK>*, char const*, unsigned long, NAMED_ILINK**) /test/10.11/sql/keycaches.cc:64:18
          #3 0x555555e3cbb3 in get_rpl_filter(st_mysql_const_lex_string*) /test/10.11/sql/keycaches.cc:193:25
          #4 0x555555e3cbb3 in get_or_create_rpl_filter(char const*, unsigned long) /test/10.11/sql/keycaches.cc:223:17
          #5 0x5555566a4bd8 in Master_info::Master_info(st_mysql_const_lex_string*, bool) /test/10.11/sql/rpl_mi.cc:78:15
          #6 0x55555621371e in mysql_execute_command(THD*, bool) /test/10.11/sql/sql_parse.cc:4213:15
          #7 0x5555561fe606 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.11/sql/sql_parse.cc:8221:18
          #8 0x5555561f6f3f in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /test/10.11/sql/sql_parse.cc:1924:7
          #9 0x5555561ffbd3 in do_command(THD*, bool) /test/10.11/sql/sql_parse.cc:1434:17
          #10 0x5555566c287c in do_handle_one_connection(CONNECT*, bool) /test/10.11/sql/sql_connect.cc:1475:11
          #11 0x5555566c2335 in handle_one_connection /test/10.11/sql/sql_connect.cc:1387:5
          #12 0x5555573974c2 in pfs_spawn_thread /test/10.11/storage/perfschema/pfs.cc:2201:3
          #13 0x7fffe669caa3 in start_thread nptl/pthread_create.c:447:8
          #14 0x7fffe6729c6b in clone3 misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
       
        Memory was marked as uninitialized
          #0 0x555555dabadd in __msan_allocated_memory (/test/MSAN_MD250526-mariadb-10.11.18-linux-x86_64-dbg/bin/mariadbd+0x857add) (BuildId: 697e53181c54d24002f39226f37eee72fd74b5e1)
          #1 0x555557fcc43d in my_malloc /test/10.11/mysys/my_malloc.c:116:7
       
      SUMMARY: MemorySanitizer: use-of-uninitialized-value (/test/MSAN_MD250526-mariadb-10.11.18-linux-x86_64-dbg/bin/mariadbd+0x85c2ec) (BuildId: 697e53181c54d24002f39226f37eee72fd74b5e1) in bcmp
      

      Bug Signature

      MSAN|use-of-uninitialized-value|sql/keycaches.cc|bcmp|NAMED_ILINK::cmp|find_named|get_rpl_filter
      

      Attachments

        Activity

          People

            ParadoxV5 Jimmy Hú
            saahil Saahil Alam
            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.