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

On Startup: UBSAN: runtime error: call to function MDL_lock::lf_hash_initializer lf_hash_insert through pointer to incorrect function type 'void (*)(st_lf_hash *, void *, const void *)'

    XMLWordPrintable

Details

    Description

      export UBSAN_OPTIONS=print_stacktrace=1
      ./mtr --start-and-exit
      

      Then check error log var/log/mysqld.1.err on a 10.5 UB+ASAN build compiled with clang (using Ubuntu clang version 15.0.7):

      10.5.26 736449d30ffb2ec71bd700ac84eb38ba30bb662c (Optimized, UBASAN)

      /test/10.5_opt_san/mysys/lf_hash.cc:419:3: runtime error: call to function MDL_lock::lf_hash_initializer(st_lf_hash*, MDL_lock*, MDL_key*) through pointer to incorrect function type 'void (*)(st_lf_hash *, void *, const void *)'
      /test/10.5_opt_san/sql/mdl.cc:677: note: MDL_lock::lf_hash_initializer(st_lf_hash*, MDL_lock*, MDL_key*) defined here
          #0 0x560b626e9f20 in lf_hash_insert /test/10.5_opt_san/mysys/lf_hash.cc:419:3
          #1 0x560b6061407d in MDL_map::find_or_insert(LF_PINS*, MDL_key const*) /test/10.5_opt_san/sql/mdl.cc:870:9
          #2 0x560b6061c68d in MDL_context::try_acquire_lock_impl(MDL_request*, MDL_ticket**) /test/10.5_opt_san/sql/mdl.cc:2112:25
          #3 0x560b6061d92b in MDL_context::acquire_lock(MDL_request*, double) /test/10.5_opt_san/sql/mdl.cc:2290:7
          #4 0x560b5fc97ad3 in open_table_get_mdl_lock(THD*, Open_table_context*, MDL_request*, unsigned int, MDL_ticket**) /test/10.5_opt_san/sql/sql_base.cc:1567:35
          #5 0x560b5fc93820 in open_table(THD*, TABLE_LIST*, Open_table_context*) /test/10.5_opt_san/sql/sql_base.cc:1837:9
          #6 0x560b5fca2856 in open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*) /test/10.5_opt_san/sql/sql_base.cc:3819:14
          #7 0x560b5fca2856 in open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) /test/10.5_opt_san/sql/sql_base.cc:4303:14
          #8 0x560b5fcb16fb in open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) /test/10.5_opt_san/sql/sql_base.cc:5250:7
          #9 0x560b5fb8b795 in open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) /test/10.5_opt_san/sql/sql_base.h:509:10
          #10 0x560b5ffb905c in plugin_load(st_mem_root*) /test/10.5_opt_san/sql/sql_plugin.cc:1897:11
          #11 0x560b5ffb6d28 in plugin_init(int*, char**, int) /test/10.5_opt_san/sql/sql_plugin.cc:1813:5
          #12 0x560b5fa5b733 in init_server_components() /test/10.5_opt_san/sql/mysqld.cc:4975:7
          #13 0x560b5fa535c2 in mysqld_main(int, char**) /test/10.5_opt_san/sql/mysqld.cc:5566:7
          #14 0x14cf630280cf in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
          #15 0x14cf63028188 in __libc_start_main csu/../csu/libc-start.c:360:3
          #16 0x560b5f985924 in _start (/test/UBASAN_MD250524-mariadb-10.5.26-linux-x86_64-opt_clang/bin/mariadbd+0x1ced924) (BuildId: e7bdfd0aad2e0971b98972c6bd187d1cc18fd1fa)
       
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /test/10.5_opt_san/mysys/lf_hash.cc:419:3 in
      /test/10.5_opt_san/mysys/lf_hash.cc:312:12: runtime error: call to function tdc_hash_key(TDC_element const*, unsigned long*, char) through pointer to incorrect function type 'unsigned char *(*)(const unsigned char *, unsigned long *, char)'
      /test/10.5_opt_san/sql/table_cache.cc:579: note: tdc_hash_key(TDC_element const*, unsigned long*, char) defined here
          #0 0x560b626ea190 in hash_key(st_lf_hash const*, unsigned char const*, unsigned long*) /test/10.5_opt_san/mysys/lf_hash.cc:312:12
          #1 0x560b626ea190 in lf_hash_insert /test/10.5_opt_san/mysys/lf_hash.cc:420:14
          #2 0x560b609963d4 in tdc_acquire_share(THD*, TABLE_LIST*, unsigned int, TABLE**) /test/10.5_opt_san/sql/table_cache.cc:812:14
          #3 0x560b5fc93d7f in open_table(THD*, TABLE_LIST*, Open_table_context*) /test/10.5_opt_san/sql/sql_base.cc:1874:10
          #4 0x560b5fca2856 in open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*) /test/10.5_opt_san/sql/sql_base.cc:3819:14
          #5 0x560b5fca2856 in open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) /test/10.5_opt_san/sql/sql_base.cc:4303:14
          #6 0x560b5fcb16fb in open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) /test/10.5_opt_san/sql/sql_base.cc:5250:7
          #7 0x560b5fb8b795 in open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) /test/10.5_opt_san/sql/sql_base.h:509:10
          #8 0x560b5ffb905c in plugin_load(st_mem_root*) /test/10.5_opt_san/sql/sql_plugin.cc:1897:11
          #9 0x560b5ffb6d28 in plugin_init(int*, char**, int) /test/10.5_opt_san/sql/sql_plugin.cc:1813:5
          #10 0x560b5fa5b733 in init_server_components() /test/10.5_opt_san/sql/mysqld.cc:4975:7
          #11 0x560b5fa535c2 in mysqld_main(int, char**) /test/10.5_opt_san/sql/mysqld.cc:5566:7
          #12 0x14cf630280cf in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
          #13 0x14cf63028188 in __libc_start_main csu/../csu/libc-start.c:360:3
          #14 0x560b5f985924 in _start (/test/UBASAN_MD250524-mariadb-10.5.26-linux-x86_64-opt_clang/bin/mariadbd+0x1ced924) (BuildId: e7bdfd0aad2e0971b98972c6bd187d1cc18fd1fa)
       
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /test/10.5_opt_san/mysys/lf_hash.cc:312:12 in
      

      10.5.26 736449d30ffb2ec71bd700ac84eb38ba30bb662c (Debug, UBASAN)

      /test/10.5_dbg_san/mysys/lf_hash.cc:419:3: runtime error: call to function MDL_lock::lf_hash_initializer(st_lf_hash*, MDL_lock*, MDL_key*) through pointer to incorrect function type 'void (*)(st_lf_hash *, void *, const void *)'
      /test/10.5_dbg_san/sql/mdl.cc:677: note: MDL_lock::lf_hash_initializer(st_lf_hash*, MDL_lock*, MDL_key*) defined here
          #0 0x558600bec209 in lf_hash_insert /test/10.5_dbg_san/mysys/lf_hash.cc:419:3
          #1 0x5585fbac8da4 in MDL_map::find_or_insert(LF_PINS*, MDL_key const*) /test/10.5_dbg_san/sql/mdl.cc:870:9
          #2 0x5585fbadc253 in MDL_context::try_acquire_lock_impl(MDL_request*, MDL_ticket**) /test/10.5_dbg_san/sql/mdl.cc:2112:25
          #3 0x5585fbae0da0 in MDL_context::acquire_lock(MDL_request*, double) /test/10.5_dbg_san/sql/mdl.cc:2290:7
          #4 0x5585fa4ba8a8 in open_table_get_mdl_lock(THD*, Open_table_context*, MDL_request*, unsigned int, MDL_ticket**) /test/10.5_dbg_san/sql/sql_base.cc:1567:35
          #5 0x5585fa4b00a5 in open_table(THD*, TABLE_LIST*, Open_table_context*) /test/10.5_dbg_san/sql/sql_base.cc:1837:9
          #6 0x5585fa4e2b2c in open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*) /test/10.5_dbg_san/sql/sql_base.cc:3819:14
          #7 0x5585fa4d5259 in open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) /test/10.5_dbg_san/sql/sql_base.cc:4303:14
          #8 0x5585fa4ff97e in open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) /test/10.5_dbg_san/sql/sql_base.cc:5250:7
          #9 0x5585fa22d3a6 in open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) /test/10.5_dbg_san/sql/sql_base.h:509:10
          #10 0x5585fabe078e in plugin_load(st_mem_root*) /test/10.5_dbg_san/sql/sql_plugin.cc:1897:11
          #11 0x5585fabdb63e in plugin_init(int*, char**, int) /test/10.5_dbg_san/sql/sql_plugin.cc:1813:5
          #12 0x5585f9f4f732 in init_server_components() /test/10.5_dbg_san/sql/mysqld.cc:4975:7
          #13 0x5585f9f437e8 in mysqld_main(int, char**) /test/10.5_dbg_san/sql/mysqld.cc:5566:7
          #14 0x5585f9f2d5f3 in main /test/10.5_dbg_san/sql/main.cc:25:10
          #15 0x149a21c280cf in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
          #16 0x149a21c28188 in __libc_start_main csu/../csu/libc-start.c:360:3
          #17 0x5585f9e694e4 in _start (/test/UBASAN_MD250524-mariadb-10.5.26-linux-x86_64-dbg_clang/bin/mariadbd+0x3fa34e4) (BuildId: 124ab9f51657882d8b0088af4599916e924d554e)
       
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /test/10.5_dbg_san/mysys/lf_hash.cc:419:3 in
      /test/10.5_dbg_san/mysys/lf_hash.cc:312:12: runtime error: call to function tdc_hash_key(TDC_element const*, unsigned long*, char) through pointer to incorrect function type 'unsigned char *(*)(const unsigned char *, unsigned long *, char)'
      /test/10.5_dbg_san/sql/table_cache.cc:579: note: tdc_hash_key(TDC_element const*, unsigned long*, char) defined here
          #0 0x558600bed542 in hash_key(st_lf_hash const*, unsigned char const*, unsigned long*) /test/10.5_dbg_san/mysys/lf_hash.cc:312:12
          #1 0x558600bec3bc in lf_hash_insert /test/10.5_dbg_san/mysys/lf_hash.cc:420:14
          #2 0x5585fc2bb423 in tdc_acquire_share(THD*, TABLE_LIST*, unsigned int, TABLE**) /test/10.5_dbg_san/sql/table_cache.cc:812:14
          #3 0x5585fa4b0dcb in open_table(THD*, TABLE_LIST*, Open_table_context*) /test/10.5_dbg_san/sql/sql_base.cc:1874:10
          #4 0x5585fa4e2b2c in open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*) /test/10.5_dbg_san/sql/sql_base.cc:3819:14
          #5 0x5585fa4d5259 in open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) /test/10.5_dbg_san/sql/sql_base.cc:4303:14
          #6 0x5585fa4ff97e in open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) /test/10.5_dbg_san/sql/sql_base.cc:5250:7
          #7 0x5585fa22d3a6 in open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) /test/10.5_dbg_san/sql/sql_base.h:509:10
          #8 0x5585fabe078e in plugin_load(st_mem_root*) /test/10.5_dbg_san/sql/sql_plugin.cc:1897:11
          #9 0x5585fabdb63e in plugin_init(int*, char**, int) /test/10.5_dbg_san/sql/sql_plugin.cc:1813:5
          #10 0x5585f9f4f732 in init_server_components() /test/10.5_dbg_san/sql/mysqld.cc:4975:7
          #11 0x5585f9f437e8 in mysqld_main(int, char**) /test/10.5_dbg_san/sql/mysqld.cc:5566:7
          #12 0x5585f9f2d5f3 in main /test/10.5_dbg_san/sql/main.cc:25:10
          #13 0x149a21c280cf in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
          #14 0x149a21c28188 in __libc_start_main csu/../csu/libc-start.c:360:3
          #15 0x5585f9e694e4 in _start (/test/UBASAN_MD250524-mariadb-10.5.26-linux-x86_64-dbg_clang/bin/mariadbd+0x3fa34e4) (BuildId: 124ab9f51657882d8b0088af4599916e924d554e)
       
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /test/10.5_dbg_san/mysys/lf_hash.cc:312:12 in
      

      11.5.0 e4afa610539ae01164485554e2de839bea9de816 (Optimized, UBASAN)

      /test/11.5_opt_san/mysys/lf_hash.cc:419:3: runtime error: call to function MDL_lock::lf_hash_initializer(st_lf_hash*, MDL_lock*, MDL_key*) through pointer to incorrect function type 'void (*)(st_lf_hash *, void *, const void *)'
      /test/11.5_opt_san/sql/mdl.cc:677: note: MDL_lock::lf_hash_initializer(st_lf_hash*, MDL_lock*, MDL_key*) defined here
          #0 0x56024ef7b6a0 in lf_hash_insert /test/11.5_opt_san/mysys/lf_hash.cc:419:3
          #1 0x56024cf4aefd in MDL_map::find_or_insert(LF_PINS*, MDL_key const*) /test/11.5_opt_san/sql/mdl.cc:870:9
          #2 0x56024cf5358d in MDL_context::try_acquire_lock_impl(MDL_request*, MDL_ticket**) /test/11.5_opt_san/sql/mdl.cc:2118:25
          #3 0x56024cf54835 in MDL_context::acquire_lock(MDL_request*, double) /test/11.5_opt_san/sql/mdl.cc:2298:7
          #4 0x56024c4e9b63 in open_table_get_mdl_lock(THD*, Open_table_context*, MDL_request*, unsigned int, MDL_ticket**) /test/11.5_opt_san/sql/sql_base.cc:1639:35
          #5 0x56024c4e5968 in open_table(THD*, TABLE_LIST*, Open_table_context*) /test/11.5_opt_san/sql/sql_base.cc:2045:9
          #6 0x56024c4f7f39 in open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*) /test/11.5_opt_san/sql/sql_base.cc:4165:14
          #7 0x56024c4f7f39 in open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) /test/11.5_opt_san/sql/sql_base.cc:4651:14
          #8 0x56024c5033cb in open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) /test/11.5_opt_san/sql/sql_base.cc:5625:7
          #9 0x56024c52c155 in open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) /test/11.5_opt_san/sql/sql_base.h:530:10
          #10 0x56024c8877a1 in plugin_load(st_mem_root*) /test/11.5_opt_san/sql/sql_plugin.cc:1903:11
          #11 0x56024c885448 in plugin_init(int*, char**, int) /test/11.5_opt_san/sql/sql_plugin.cc:1816:5
          #12 0x56024c1b95d6 in init_server_components() /test/11.5_opt_san/sql/mysqld.cc:5159:7
          #13 0x56024c1b1014 in mysqld_main(int, char**) /test/11.5_opt_san/sql/mysqld.cc:5810:7
          #14 0x14b8a3e280cf in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
          #15 0x14b8a3e28188 in __libc_start_main csu/../csu/libc-start.c:360:3
          #16 0x56024c0e3bb4 in _start (/test/UBASAN_MD250524-mariadb-11.5.0-linux-x86_64-opt_clang/bin/mariadbd+0x1edbbb4) (BuildId: 6e6154e50e2ce553fb3f9b68aaca1dd70d9fa553)
       
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /test/11.5_opt_san/mysys/lf_hash.cc:419:3 in
      /test/11.5_opt_san/mysys/lf_hash.cc:312:12: runtime error: call to function tdc_hash_key(TDC_element const*, unsigned long*, char) through pointer to incorrect function type 'unsigned char *(*)(const unsigned char *, unsigned long *, char)'
      /test/11.5_opt_san/sql/table_cache.cc:589: note: tdc_hash_key(TDC_element const*, unsigned long*, char) defined here
          #0 0x56024ef7b910 in hash_key(st_lf_hash const*, unsigned char const*, unsigned long*) /test/11.5_opt_san/mysys/lf_hash.cc:312:12
          #1 0x56024ef7b910 in lf_hash_insert /test/11.5_opt_san/mysys/lf_hash.cc:420:14
          #2 0x56024d39a764 in tdc_acquire_share(THD*, TABLE_LIST*, unsigned int, TABLE**) /test/11.5_opt_san/sql/table_cache.cc:829:14
          #3 0x56024c4e5e11 in open_table(THD*, TABLE_LIST*, Open_table_context*) /test/11.5_opt_san/sql/sql_base.cc:2082:10
          #4 0x56024c4f7f39 in open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*) /test/11.5_opt_san/sql/sql_base.cc:4165:14
          #5 0x56024c4f7f39 in open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) /test/11.5_opt_san/sql/sql_base.cc:4651:14
          #6 0x56024c5033cb in open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) /test/11.5_opt_san/sql/sql_base.cc:5625:7
          #7 0x56024c52c155 in open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) /test/11.5_opt_san/sql/sql_base.h:530:10
          #8 0x56024c8877a1 in plugin_load(st_mem_root*) /test/11.5_opt_san/sql/sql_plugin.cc:1903:11
          #9 0x56024c885448 in plugin_init(int*, char**, int) /test/11.5_opt_san/sql/sql_plugin.cc:1816:5
          #10 0x56024c1b95d6 in init_server_components() /test/11.5_opt_san/sql/mysqld.cc:5159:7
          #11 0x56024c1b1014 in mysqld_main(int, char**) /test/11.5_opt_san/sql/mysqld.cc:5810:7
          #12 0x14b8a3e280cf in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
          #13 0x14b8a3e28188 in __libc_start_main csu/../csu/libc-start.c:360:3
          #14 0x56024c0e3bb4 in _start (/test/UBASAN_MD250524-mariadb-11.5.0-linux-x86_64-opt_clang/bin/mariadbd+0x1edbbb4) (BuildId: 6e6154e50e2ce553fb3f9b68aaca1dd70d9fa553)
       
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /test/11.5_opt_san/mysys/lf_hash.cc:312:12 in
      

      11.5.0 e4afa610539ae01164485554e2de839bea9de816 (Debug, UBASAN)

      /test/11.5_dbg_san/mysys/lf_hash.cc:419:3: runtime error: call to function MDL_lock::lf_hash_initializer(st_lf_hash*, MDL_lock*, MDL_key*) through pointer to incorrect function type 'void (*)(st_lf_hash *, void *, const void *)'
      /test/11.5_dbg_san/sql/mdl.cc:677: note: MDL_lock::lf_hash_initializer(st_lf_hash*, MDL_lock*, MDL_key*) defined here
          #0 0x55e382426869 in lf_hash_insert /test/11.5_dbg_san/mysys/lf_hash.cc:419:3
          #1 0x55e37d353104 in MDL_map::find_or_insert(LF_PINS*, MDL_key const*) /test/11.5_dbg_san/sql/mdl.cc:870:9
          #2 0x55e37d366863 in MDL_context::try_acquire_lock_impl(MDL_request*, MDL_ticket**) /test/11.5_dbg_san/sql/mdl.cc:2118:25
          #3 0x55e37d36b650 in MDL_context::acquire_lock(MDL_request*, double) /test/11.5_dbg_san/sql/mdl.cc:2298:7
          #4 0x55e37bb01be8 in open_table_get_mdl_lock(THD*, Open_table_context*, MDL_request*, unsigned int, MDL_ticket**) /test/11.5_dbg_san/sql/sql_base.cc:1639:35
          #5 0x55e37baf7829 in open_table(THD*, TABLE_LIST*, Open_table_context*) /test/11.5_dbg_san/sql/sql_base.cc:2045:9
          #6 0x55e37bb30a5f in open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*) /test/11.5_dbg_san/sql/sql_base.cc:4165:14
          #7 0x55e37bb23769 in open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) /test/11.5_dbg_san/sql/sql_base.cc:4651:14
          #8 0x55e37bb47d0e in open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) /test/11.5_dbg_san/sql/sql_base.cc:5625:7
          #9 0x55e37bbabd66 in open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) /test/11.5_dbg_san/sql/sql_base.h:530:10
          #10 0x55e37c35a04b in plugin_load(st_mem_root*) /test/11.5_dbg_san/sql/sql_plugin.cc:1903:11
          #11 0x55e37c354bb4 in plugin_init(int*, char**, int) /test/11.5_dbg_san/sql/sql_plugin.cc:1816:5
          #12 0x55e37b35d309 in init_server_components() /test/11.5_dbg_san/sql/mysqld.cc:5159:7
          #13 0x55e37b350d30 in mysqld_main(int, char**) /test/11.5_dbg_san/sql/mysqld.cc:5810:7
          #14 0x55e37b33af33 in main /test/11.5_dbg_san/sql/main.cc:34:10
          #15 0x14ab61e280cf in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
          #16 0x14ab61e28188 in __libc_start_main csu/../csu/libc-start.c:360:3
          #17 0x55e37b276e24 in _start (/test/UBASAN_MD250524-mariadb-11.5.0-linux-x86_64-dbg_clang/bin/mariadbd+0x4163e24) (BuildId: 34ad4b787f1026e996e53a47469a844451e3860e)
       
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /test/11.5_dbg_san/mysys/lf_hash.cc:419:3 in
      /test/11.5_dbg_san/mysys/lf_hash.cc:312:12: runtime error: call to function tdc_hash_key(TDC_element const*, unsigned long*, char) through pointer to incorrect function type 'unsigned char *(*)(const unsigned char *, unsigned long *, char)'
      /test/11.5_dbg_san/sql/table_cache.cc:589: note: tdc_hash_key(TDC_element const*, unsigned long*, char) defined here
          #0 0x55e382427ba2 in hash_key(st_lf_hash const*, unsigned char const*, unsigned long*) /test/11.5_dbg_san/mysys/lf_hash.cc:312:12
          #1 0x55e382426a1c in lf_hash_insert /test/11.5_dbg_san/mysys/lf_hash.cc:420:14
          #2 0x55e37dd0cf23 in tdc_acquire_share(THD*, TABLE_LIST*, unsigned int, TABLE**) /test/11.5_dbg_san/sql/table_cache.cc:829:14
          #3 0x55e37baf85da in open_table(THD*, TABLE_LIST*, Open_table_context*) /test/11.5_dbg_san/sql/sql_base.cc:2082:10
          #4 0x55e37bb30a5f in open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*) /test/11.5_dbg_san/sql/sql_base.cc:4165:14
          #5 0x55e37bb23769 in open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) /test/11.5_dbg_san/sql/sql_base.cc:4651:14
          #6 0x55e37bb47d0e in open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) /test/11.5_dbg_san/sql/sql_base.cc:5625:7
          #7 0x55e37bbabd66 in open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) /test/11.5_dbg_san/sql/sql_base.h:530:10
          #8 0x55e37c35a04b in plugin_load(st_mem_root*) /test/11.5_dbg_san/sql/sql_plugin.cc:1903:11
          #9 0x55e37c354bb4 in plugin_init(int*, char**, int) /test/11.5_dbg_san/sql/sql_plugin.cc:1816:5
          #10 0x55e37b35d309 in init_server_components() /test/11.5_dbg_san/sql/mysqld.cc:5159:7
          #11 0x55e37b350d30 in mysqld_main(int, char**) /test/11.5_dbg_san/sql/mysqld.cc:5810:7
          #12 0x55e37b33af33 in main /test/11.5_dbg_san/sql/main.cc:34:10
          #13 0x14ab61e280cf in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
          #14 0x14ab61e28188 in __libc_start_main csu/../csu/libc-start.c:360:3
          #15 0x55e37b276e24 in _start (/test/UBASAN_MD250524-mariadb-11.5.0-linux-x86_64-dbg_clang/bin/mariadbd+0x4163e24) (BuildId: 34ad4b787f1026e996e53a47469a844451e3860e)
       
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /test/11.5_dbg_san/mysys/lf_hash.cc:312:12 in
      

      Opt build cmake (if needed):

      cmake . -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DWITH_SSL=bundled -DBUILD_CONFIG=mysql_release -DWITH_TOKUDB=0 -DWITH_JEMALLOC=no -DFEATURE_SET=community -DDEBUG_EXTNAME=OFF -DWITH_EMBEDDED_SERVER=0 -DENABLE_DOWNLOADS=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/tmp/boost_381264 -DENABLED_LOCAL_INFILE=1 -DENABLE_DTRACE=0 -DWITH_SAFEMALLOC=OFF -DPLUGIN_PERFSCHEMA=NO -DWITH_DBUG_TRACE=OFF -DWITH_ZLIB=bundled -DWITH_ROCKSDB=1 -DWITH_PAM=ON -DWITH_MARIABACKUP=0 -DFORCE_INSOURCE_BUILD=1 -DWITH_ASAN=ON -DWITH_ASAN_SCOPE=ON -DWITH_UBSAN=ON -DWSREP_LIB_WITH_ASAN=ON -DCMAKE_CXX_FLAGS=-fsanitize-coverage=trace-pc-guard -DMYSQL_MAINTAINER_MODE=OFF -DWARNING_AS_ERROR='' -DCMAKE_BUILD_TYPE=RelWithDebInfo
      

      Note there are will be some other UBSAN errors atm, like MDEV-34226.

      Attachments

        Issue Links

          Activity

            People

              bnestere Brandon Nesterenko
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.