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

Valgrind / MSAN errors in Histogram_json_hb::parse_bucket, main.statistics_json fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: N/A
    • Fix Version/s: 10.8.0
    • Component/s: Optimizer, Tests
    • Labels:
      None

      Description

      preview-10.8-MDEV-26519-json-histograms 98cb4351 with Valgrind

      perl ./mtr main.statistics_json --valgrind --mem
       
      ==678967== Thread 25:
      ==678967== Conditional jump or move depends on uninitialised value(s)
      ==678967==    at 0x17F4443: my_mb_wc_utf8mb4_quick (ctype-utf8.h:142)
      ==678967==    by 0x17F956D: my_mb_wc_utf8mb4 (ctype-utf8.c:7528)
      ==678967==    by 0x17FE713: my_convert_fix (ctype.c:1306)
      ==678967==    by 0xBC0655: String_copier::well_formed_copy(charset_info_st const*, char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long) (sql_string.cc:1133)
      ==678967==    by 0xE6B6C4: Field_longstr::well_formed_copy_with_check(char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long, bool, unsigned int*) (field.h:2195)
      ==678967==    by 0xE5C43A: Field_varstring::store(char const*, unsigned long, charset_info_st const*) (field.cc:7843)
      ==678967==    by 0xC6ED23: Field::store_text(char const*, unsigned long, charset_info_st const*) (field.h:939)
      ==678967==    by 0xCF93B2: read_bucket_endpoint(st_json_engine_t*, Field*, String*, char const**) (opt_histogram_json.cc:496)
      ==678967==    by 0xCF997F: Histogram_json_hb::parse_bucket(st_json_engine_t*, Field*, double*, bool*, char const**) (opt_histogram_json.cc:605)
      ==678967==    by 0xCFA288: Histogram_json_hb::parse(st_mem_root*, char const*, char const*, Field*, enum_histogram_type, char const*, unsigned long) (opt_histogram_json.cc:785)
      ==678967==    by 0xBBAF07: Column_stat::load_histogram(st_mem_root*) (sql_statistics.cc:1236)
      ==678967==    by 0xBB56C6: read_histograms_for_table(THD*, TABLE*, TABLE_LIST*) (sql_statistics.cc:3198)
      ==678967==    by 0xBB5D49: read_statistics_for_tables(THD*, TABLE_LIST*) (sql_statistics.cc:3337)
      ==678967==    by 0xBB57F0: read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) (sql_statistics.cc:3246)
      ==678967==    by 0xA08F72: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5276)
      ==678967==    by 0x9BEC00: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:509)
      ==678967== Conditional jump or move depends on uninitialised value(s)
      ==678967==    at 0x17F445F: my_mb_wc_utf8mb4_quick (ctype-utf8.h:146)
      ==678967==    by 0x17F956D: my_mb_wc_utf8mb4 (ctype-utf8.c:7528)
      ==678967==    by 0x17FE713: my_convert_fix (ctype.c:1306)
      ==678967==    by 0xBC0655: String_copier::well_formed_copy(charset_info_st const*, char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long) (sql_string.cc:1133)
      ==678967==    by 0xE6B6C4: Field_longstr::well_formed_copy_with_check(char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long, bool, unsigned int*) (field.h:2195)
      ==678967==    by 0xE5C43A: Field_varstring::store(char const*, unsigned long, charset_info_st const*) (field.cc:7843)
      ==678967==    by 0xC6ED23: Field::store_text(char const*, unsigned long, charset_info_st const*) (field.h:939)
      ==678967==    by 0xCF93B2: read_bucket_endpoint(st_json_engine_t*, Field*, String*, char const**) (opt_histogram_json.cc:496)
      ==678967==    by 0xCF997F: Histogram_json_hb::parse_bucket(st_json_engine_t*, Field*, double*, bool*, char const**) (opt_histogram_json.cc:605)
      ==678967==    by 0xCFA288: Histogram_json_hb::parse(st_mem_root*, char const*, char const*, Field*, enum_histogram_type, char const*, unsigned long) (opt_histogram_json.cc:785)
      ==678967==    by 0xBBAF07: Column_stat::load_histogram(st_mem_root*) (sql_statistics.cc:1236)
      ==678967==    by 0xBB56C6: read_histograms_for_table(THD*, TABLE*, TABLE_LIST*) (sql_statistics.cc:3198)
      ==678967==    by 0xBB5D49: read_statistics_for_tables(THD*, TABLE_LIST*) (sql_statistics.cc:3337)
      ==678967==    by 0xBB57F0: read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) (sql_statistics.cc:3246)
      ==678967==    by 0xA08F72: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5276)
      ==678967==    by 0x9BEC00: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:509)
      ==678967== Conditional jump or move depends on uninitialised value(s)
      ==678967==    at 0x17D1CE8: my_wc_mb_latin1 (ctype-latin1.c:392)
      ==678967==    by 0x17FE7D8: my_convert_fix (ctype.c:1337)
      ==678967==    by 0xBC0655: String_copier::well_formed_copy(charset_info_st const*, char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long) (sql_string.cc:1133)
      ==678967==    by 0xE6B6C4: Field_longstr::well_formed_copy_with_check(char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long, bool, unsigned int*) (field.h:2195)
      ==678967==    by 0xE5C43A: Field_varstring::store(char const*, unsigned long, charset_info_st const*) (field.cc:7843)
      ==678967==    by 0xC6ED23: Field::store_text(char const*, unsigned long, charset_info_st const*) (field.h:939)
      ==678967==    by 0xCF93B2: read_bucket_endpoint(st_json_engine_t*, Field*, String*, char const**) (opt_histogram_json.cc:496)
      ==678967==    by 0xCF997F: Histogram_json_hb::parse_bucket(st_json_engine_t*, Field*, double*, bool*, char const**) (opt_histogram_json.cc:605)
      ==678967==    by 0xCFA288: Histogram_json_hb::parse(st_mem_root*, char const*, char const*, Field*, enum_histogram_type, char const*, unsigned long) (opt_histogram_json.cc:785)
      ==678967==    by 0xBBAF07: Column_stat::load_histogram(st_mem_root*) (sql_statistics.cc:1236)
      ==678967==    by 0xBB56C6: read_histograms_for_table(THD*, TABLE*, TABLE_LIST*) (sql_statistics.cc:3198)
      ==678967==    by 0xBB5D49: read_statistics_for_tables(THD*, TABLE_LIST*) (sql_statistics.cc:3337)
      ==678967==    by 0xBB57F0: read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) (sql_statistics.cc:3246)
      ==678967==    by 0xA08F72: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5276)
      ==678967==    by 0x9BEC00: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:509)
      ==678967==    by 0xAC1FB8: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:6174)
      ==678967== Use of uninitialised value of size 8
      ==678967==    at 0x17D1D25: my_wc_mb_latin1 (ctype-latin1.c:396)
      ==678967==    by 0x17FE7D8: my_convert_fix (ctype.c:1337)
      ==678967==    by 0xBC0655: String_copier::well_formed_copy(charset_info_st const*, char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long) (sql_string.cc:1133)
      ==678967==    by 0xE6B6C4: Field_longstr::well_formed_copy_with_check(char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long, bool, unsigned int*) (field.h:2195)
      ==678967==    by 0xE5C43A: Field_varstring::store(char const*, unsigned long, charset_info_st const*) (field.cc:7843)
      ==678967==    by 0xC6ED23: Field::store_text(char const*, unsigned long, charset_info_st const*) (field.h:939)
      ==678967==    by 0xCF93B2: read_bucket_endpoint(st_json_engine_t*, Field*, String*, char const**) (opt_histogram_json.cc:496)
      ==678967==    by 0xCF997F: Histogram_json_hb::parse_bucket(st_json_engine_t*, Field*, double*, bool*, char const**) (opt_histogram_json.cc:605)
      ==678967==    by 0xCFA288: Histogram_json_hb::parse(st_mem_root*, char const*, char const*, Field*, enum_histogram_type, char const*, unsigned long) (opt_histogram_json.cc:785)
      ==678967==    by 0xBBAF07: Column_stat::load_histogram(st_mem_root*) (sql_statistics.cc:1236)
      ==678967==    by 0xBB56C6: read_histograms_for_table(THD*, TABLE*, TABLE_LIST*) (sql_statistics.cc:3198)
      ==678967==    by 0xBB5D49: read_statistics_for_tables(THD*, TABLE_LIST*) (sql_statistics.cc:3337)
      ==678967==    by 0xBB57F0: read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) (sql_statistics.cc:3246)
      ==678967==    by 0xA08F72: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5276)
      ==678967==    by 0x9BEC00: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:509)
      ==678967==    by 0xAC1FB8: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:6174)
      ==678967== Conditional jump or move depends on uninitialised value(s)
      ==678967==    at 0x17D1D45: my_wc_mb_latin1 (ctype-latin1.c:397)
      ==678967==    by 0x17FE7D8: my_convert_fix (ctype.c:1337)
      ==678967==    by 0xBC0655: String_copier::well_formed_copy(charset_info_st const*, char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long) (sql_string.cc:1133)
      ==678967==    by 0xE6B6C4: Field_longstr::well_formed_copy_with_check(char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long, bool, unsigned int*) (field.h:2195)
      ==678967==    by 0xE5C43A: Field_varstring::store(char const*, unsigned long, charset_info_st const*) (field.cc:7843)
      ==678967==    by 0xC6ED23: Field::store_text(char const*, unsigned long, charset_info_st const*) (field.h:939)
      ==678967==    by 0xCF93B2: read_bucket_endpoint(st_json_engine_t*, Field*, String*, char const**) (opt_histogram_json.cc:496)
      ==678967==    by 0xCF997F: Histogram_json_hb::parse_bucket(st_json_engine_t*, Field*, double*, bool*, char const**) (opt_histogram_json.cc:605)
      ==678967==    by 0xCFA288: Histogram_json_hb::parse(st_mem_root*, char const*, char const*, Field*, enum_histogram_type, char const*, unsigned long) (opt_histogram_json.cc:785)
      ==678967==    by 0xBBAF07: Column_stat::load_histogram(st_mem_root*) (sql_statistics.cc:1236)
      ==678967==    by 0xBB56C6: read_histograms_for_table(THD*, TABLE*, TABLE_LIST*) (sql_statistics.cc:3198)
      ==678967==    by 0xBB5D49: read_statistics_for_tables(THD*, TABLE_LIST*) (sql_statistics.cc:3337)
      ==678967==    by 0xBB57F0: read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) (sql_statistics.cc:3246)
      ==678967==    by 0xA08F72: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5276)
      ==678967==    by 0x9BEC00: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:509)
      ==678967==    by 0xAC1FB8: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:6174)
      ==678967== Invalid read of size 1
      ==678967==    at 0x17F4453: my_mb_wc_utf8mb4_quick (ctype-utf8.h:145)
      ==678967==    by 0x17F956D: my_mb_wc_utf8mb4 (ctype-utf8.c:7528)
      ==678967==    by 0x17FE713: my_convert_fix (ctype.c:1306)
      ==678967==    by 0xBC0655: String_copier::well_formed_copy(charset_info_st const*, char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long) (sql_string.cc:1133)
      ==678967==    by 0xE6B6C4: Field_longstr::well_formed_copy_with_check(char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long, bool, unsigned int*) (field.h:2195)
      ==678967==    by 0xE5C43A: Field_varstring::store(char const*, unsigned long, charset_info_st const*) (field.cc:7843)
      ==678967==    by 0xC6ED23: Field::store_text(char const*, unsigned long, charset_info_st const*) (field.h:939)
      ==678967==    by 0xCF93B2: read_bucket_endpoint(st_json_engine_t*, Field*, String*, char const**) (opt_histogram_json.cc:496)
      ==678967==    by 0xCF997F: Histogram_json_hb::parse_bucket(st_json_engine_t*, Field*, double*, bool*, char const**) (opt_histogram_json.cc:605)
      ==678967==    by 0xCFA288: Histogram_json_hb::parse(st_mem_root*, char const*, char const*, Field*, enum_histogram_type, char const*, unsigned long) (opt_histogram_json.cc:785)
      ==678967==    by 0xBBAF07: Column_stat::load_histogram(st_mem_root*) (sql_statistics.cc:1236)
      ==678967==    by 0xBB56C6: read_histograms_for_table(THD*, TABLE*, TABLE_LIST*) (sql_statistics.cc:3198)
      ==678967==    by 0xBB5D49: read_statistics_for_tables(THD*, TABLE_LIST*) (sql_statistics.cc:3337)
      ==678967==    by 0xBB57F0: read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) (sql_statistics.cc:3246)
      ==678967==    by 0xA08F72: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5276)
      ==678967==    by 0x9BEC00: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:509)
      ==678967==  Address 0x172fe038 is 0 bytes after a block of size 56 alloc'd
      ==678967==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==678967==    by 0x1789770: my_malloc (my_malloc.c:90)
      ==678967==    by 0x1789AEA: my_realloc (my_malloc.c:141)
      ==678967==    by 0x10FE7E8: _ma_alloc_buffer (ma_open.c:1253)
      ==678967==    by 0x112A79F: _ma_read_block_record2 (ma_blockrec.c:4967)
      ==678967==    by 0x112B2CF: _ma_read_block_record (ma_blockrec.c:5201)
      ==678967==    by 0x1106C87: maria_rkey (ma_rkey.c:211)
      ==678967==    by 0x10B314A: ha_maria::index_read_idx_map(unsigned char*, unsigned int, unsigned char const*, unsigned long, ha_rkey_function) (ha_maria.cc:2451)
      ==678967==    by 0xE8CF48: handler::ha_index_read_idx_map(unsigned char*, unsigned int, unsigned char const*, unsigned long, ha_rkey_function) (handler.cc:3478)
      ==678967==    by 0xBB9895: Stat_table::find_stat() (sql_statistics.cc:589)
      ==678967==    by 0xBBA8B1: Column_stat::get_stat_values() (sql_statistics.cc:1126)
      ==678967==    by 0xBB4E26: read_statistics_for_table(THD*, TABLE*, TABLE_LIST*) (sql_statistics.cc:3035)
      ==678967==    by 0xBB5CEF: read_statistics_for_tables(THD*, TABLE_LIST*) (sql_statistics.cc:3331)
      ==678967==    by 0xBB57F0: read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) (sql_statistics.cc:3246)
      ==678967==    by 0xA08F72: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5276)
      ==678967==    by 0x9BEC00: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:509)
      ==678967== Conditional jump or move depends on uninitialised value(s)
      ==678967==    at 0x17F4498: my_mb_wc_utf8mb4_quick (ctype-utf8.h:155)
      ==678967==    by 0x17F956D: my_mb_wc_utf8mb4 (ctype-utf8.c:7528)
      ==678967==    by 0x17FE713: my_convert_fix (ctype.c:1306)
      ==678967==    by 0xBC0655: String_copier::well_formed_copy(charset_info_st const*, char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long) (sql_string.cc:1133)
      ==678967==    by 0xE6B6C4: Field_longstr::well_formed_copy_with_check(char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long, bool, unsigned int*) (field.h:2195)
      ==678967==    by 0xE5C43A: Field_varstring::store(char const*, unsigned long, charset_info_st const*) (field.cc:7843)
      ==678967==    by 0xC6ED23: Field::store_text(char const*, unsigned long, charset_info_st const*) (field.h:939)
      ==678967==    by 0xCF93B2: read_bucket_endpoint(st_json_engine_t*, Field*, String*, char const**) (opt_histogram_json.cc:496)
      ==678967==    by 0xCF997F: Histogram_json_hb::parse_bucket(st_json_engine_t*, Field*, double*, bool*, char const**) (opt_histogram_json.cc:605)
      ==678967==    by 0xCFA288: Histogram_json_hb::parse(st_mem_root*, char const*, char const*, Field*, enum_histogram_type, char const*, unsigned long) (opt_histogram_json.cc:785)
      ==678967==    by 0xBBAF07: Column_stat::load_histogram(st_mem_root*) (sql_statistics.cc:1236)
      ==678967==    by 0xBB56C6: read_histograms_for_table(THD*, TABLE*, TABLE_LIST*) (sql_statistics.cc:3198)
      ==678967==    by 0xBB5D49: read_statistics_for_tables(THD*, TABLE_LIST*) (sql_statistics.cc:3337)
      ==678967==    by 0xBB57F0: read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) (sql_statistics.cc:3246)
      ==678967==    by 0xA08F72: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5276)
      ==678967==    by 0x9BEC00: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:509)
      ==678967== Invalid read of size 1
      ==678967==    at 0x17F44AC: my_mb_wc_utf8mb4_quick (ctype-utf8.h:158)
      ==678967==    by 0x17F956D: my_mb_wc_utf8mb4 (ctype-utf8.c:7528)
      ==678967==    by 0x17FE713: my_convert_fix (ctype.c:1306)
      ==678967==    by 0xBC0655: String_copier::well_formed_copy(charset_info_st const*, char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long) (sql_string.cc:1133)
      ==678967==    by 0xE6B6C4: Field_longstr::well_formed_copy_with_check(char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long, bool, unsigned int*) (field.h:2195)
      ==678967==    by 0xE5C43A: Field_varstring::store(char const*, unsigned long, charset_info_st const*) (field.cc:7843)
      ==678967==    by 0xC6ED23: Field::store_text(char const*, unsigned long, charset_info_st const*) (field.h:939)
      ==678967==    by 0xCF93B2: read_bucket_endpoint(st_json_engine_t*, Field*, String*, char const**) (opt_histogram_json.cc:496)
      ==678967==    by 0xCF997F: Histogram_json_hb::parse_bucket(st_json_engine_t*, Field*, double*, bool*, char const**) (opt_histogram_json.cc:605)
      ==678967==    by 0xCFA288: Histogram_json_hb::parse(st_mem_root*, char const*, char const*, Field*, enum_histogram_type, char const*, unsigned long) (opt_histogram_json.cc:785)
      ==678967==    by 0xBBAF07: Column_stat::load_histogram(st_mem_root*) (sql_statistics.cc:1236)
      ==678967==    by 0xBB56C6: read_histograms_for_table(THD*, TABLE*, TABLE_LIST*) (sql_statistics.cc:3198)
      ==678967==    by 0xBB5D49: read_statistics_for_tables(THD*, TABLE_LIST*) (sql_statistics.cc:3337)
      ==678967==    by 0xBB57F0: read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) (sql_statistics.cc:3246)
      ==678967==    by 0xA08F72: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5276)
      ==678967==    by 0x9BEC00: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:509)
      ==678967==  Address 0x172fe049 is 17 bytes after a block of size 56 alloc'd
      ==678967==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==678967==    by 0x1789770: my_malloc (my_malloc.c:90)
      ==678967==    by 0x1789AEA: my_realloc (my_malloc.c:141)
      ==678967==    by 0x10FE7E8: _ma_alloc_buffer (ma_open.c:1253)
      ==678967==    by 0x112A79F: _ma_read_block_record2 (ma_blockrec.c:4967)
      ==678967==    by 0x112B2CF: _ma_read_block_record (ma_blockrec.c:5201)
      ==678967==    by 0x1106C87: maria_rkey (ma_rkey.c:211)
      ==678967==    by 0x10B314A: ha_maria::index_read_idx_map(unsigned char*, unsigned int, unsigned char const*, unsigned long, ha_rkey_function) (ha_maria.cc:2451)
      ==678967==    by 0xE8CF48: handler::ha_index_read_idx_map(unsigned char*, unsigned int, unsigned char const*, unsigned long, ha_rkey_function) (handler.cc:3478)
      ==678967==    by 0xBB9895: Stat_table::find_stat() (sql_statistics.cc:589)
      ==678967==    by 0xBBA8B1: Column_stat::get_stat_values() (sql_statistics.cc:1126)
      ==678967==    by 0xBB4E26: read_statistics_for_table(THD*, TABLE*, TABLE_LIST*) (sql_statistics.cc:3035)
      ==678967==    by 0xBB5CEF: read_statistics_for_tables(THD*, TABLE_LIST*) (sql_statistics.cc:3331)
      ==678967==    by 0xBB57F0: read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) (sql_statistics.cc:3246)
      ==678967==    by 0xA08F72: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5276)
      ==678967==    by 0x9BEC00: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:509)
      ==678967== Conditional jump or move depends on uninitialised value(s)
      ==678967==    at 0x17F45B8: my_mb_wc_utf8mb4_quick (ctype-utf8.h:177)
      ==678967==    by 0x17F956D: my_mb_wc_utf8mb4 (ctype-utf8.c:7528)
      ==678967==    by 0x17FE713: my_convert_fix (ctype.c:1306)
      ==678967==    by 0xBC0655: String_copier::well_formed_copy(charset_info_st const*, char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long) (sql_string.cc:1133)
      ==678967==    by 0xE6B6C4: Field_longstr::well_formed_copy_with_check(char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long, bool, unsigned int*) (field.h:2195)
      ==678967==    by 0xE5C43A: Field_varstring::store(char const*, unsigned long, charset_info_st const*) (field.cc:7843)
      ==678967==    by 0xC6ED23: Field::store_text(char const*, unsigned long, charset_info_st const*) (field.h:939)
      ==678967==    by 0xCF93B2: read_bucket_endpoint(st_json_engine_t*, Field*, String*, char const**) (opt_histogram_json.cc:496)
      ==678967==    by 0xCF997F: Histogram_json_hb::parse_bucket(st_json_engine_t*, Field*, double*, bool*, char const**) (opt_histogram_json.cc:605)
      ==678967==    by 0xCFA288: Histogram_json_hb::parse(st_mem_root*, char const*, char const*, Field*, enum_histogram_type, char const*, unsigned long) (opt_histogram_json.cc:785)
      ==678967==    by 0xBBAF07: Column_stat::load_histogram(st_mem_root*) (sql_statistics.cc:1236)
      ==678967==    by 0xBB56C6: read_histograms_for_table(THD*, TABLE*, TABLE_LIST*) (sql_statistics.cc:3198)
      ==678967==    by 0xBB5D49: read_statistics_for_tables(THD*, TABLE_LIST*) (sql_statistics.cc:3337)
      ==678967==    by 0xBB57F0: read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) (sql_statistics.cc:3246)
      ==678967==    by 0xA08F72: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5276)
      ==678967==    by 0x9BEC00: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:509)
      ==678967== Invalid read of size 1
      ==678967==    at 0x17F45CC: my_mb_wc_utf8mb4_quick (ctype-utf8.h:180)
      ==678967==    by 0x17F956D: my_mb_wc_utf8mb4 (ctype-utf8.c:7528)
      ==678967==    by 0x17FE713: my_convert_fix (ctype.c:1306)
      ==678967==    by 0xBC0655: String_copier::well_formed_copy(charset_info_st const*, char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long) (sql_string.cc:1133)
      ==678967==    by 0xE6B6C4: Field_longstr::well_formed_copy_with_check(char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long, bool, unsigned int*) (field.h:2195)
      ==678967==    by 0xE5C43A: Field_varstring::store(char const*, unsigned long, charset_info_st const*) (field.cc:7843)
      ==678967==    by 0xC6ED23: Field::store_text(char const*, unsigned long, charset_info_st const*) (field.h:939)
      ==678967==    by 0xCF93B2: read_bucket_endpoint(st_json_engine_t*, Field*, String*, char const**) (opt_histogram_json.cc:496)
      ==678967==    by 0xCF997F: Histogram_json_hb::parse_bucket(st_json_engine_t*, Field*, double*, bool*, char const**) (opt_histogram_json.cc:605)
      ==678967==    by 0xCFA288: Histogram_json_hb::parse(st_mem_root*, char const*, char const*, Field*, enum_histogram_type, char const*, unsigned long) (opt_histogram_json.cc:785)
      ==678967==    by 0xBBAF07: Column_stat::load_histogram(st_mem_root*) (sql_statistics.cc:1236)
      ==678967==    by 0xBB56C6: read_histograms_for_table(THD*, TABLE*, TABLE_LIST*) (sql_statistics.cc:3198)
      ==678967==    by 0xBB5D49: read_statistics_for_tables(THD*, TABLE_LIST*) (sql_statistics.cc:3337)
      ==678967==    by 0xBB57F0: read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) (sql_statistics.cc:3246)
      ==678967==    by 0xA08F72: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5276)
      ==678967==    by 0x9BEC00: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:509)
      ==678967==  Address 0x172fe0c9 is 57 bytes inside a block of size 64 free'd
      ==678967==    at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==678967==    by 0x1789F5F: my_free (my_malloc.c:211)
      ==678967==    by 0x1778EAC: root_free (my_alloc.c:78)
      ==678967==    by 0x1779C79: free_root (my_alloc.c:495)
      ==678967==    by 0xAB54A8: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) (sql_parse.cc:2449)
      ==678967==    by 0xAB2123: do_command(THD*, bool) (sql_parse.cc:1402)
      ==678967==    by 0xC8EB6C: do_handle_one_connection(CONNECT*, bool) (sql_connect.cc:1418)
      ==678967==    by 0xC8E7FC: handle_one_connection (sql_connect.cc:1312)
      ==678967==    by 0x11AFA5C: pfs_spawn_thread (pfs.cc:2201)
      ==678967==    by 0x4DC5608: start_thread (pthread_create.c:477)
      ==678967==    by 0x5255292: clone (clone.S:95)
      ==678967==  Block was alloc'd at
      ==678967==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==678967==    by 0x1789770: my_malloc (my_malloc.c:90)
      ==678967==    by 0x17793CF: alloc_root (my_alloc.c:287)
      ==678967==    by 0x931098: Query_arena::alloc(unsigned long) (sql_class.h:1209)
      ==678967==    by 0xEA738A: make_name(THD*, char const*, unsigned long, charset_info_st const*, unsigned long) (item.cc:1194)
      ==678967==    by 0xEA76C1: Item::set_name(THD*, char const*, unsigned long, charset_info_st const*) (item.cc:1258)
      ==678967==    by 0x97F7ED: Item::set_name(THD*, st_mysql_const_lex_string const&, charset_info_st const*) (item.h:1129)
      ==678967==    by 0x97FCB7: Item_string::Item_string(THD*, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, charset_info_st const*, Derivation) (item.h:4650)
      ==678967==    by 0x97FEB5: Item_partition_func_safe_string::Item_partition_func_safe_string(THD*, st_mysql_const_lex_string const&, unsigned int, charset_info_st const*) (item.h:4814)
      ==678967==    by 0x980011: Item_empty_string::Item_empty_string(THD*, char const*, unsigned int, charset_info_st const*) (item.h:4841)
      ==678967==    by 0xA5DB5F: mysqld_show_warnings(THD*, unsigned long) (sql_error.cc:808)
      ==678967==    by 0xAB9A5D: mysql_execute_command(THD*, bool) (sql_parse.cc:4014)
      ==678967==    by 0xAC7333: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:8028)
      ==678967==    by 0xAB3787: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) (sql_parse.cc:1894)
      ==678967==    by 0xAB2123: do_command(THD*, bool) (sql_parse.cc:1402)
      ==678967==    by 0xC8EB6C: do_handle_one_connection(CONNECT*, bool) (sql_connect.cc:1418)
      ==678967== Conditional jump or move depends on uninitialised value(s)
      ==678967==    at 0x17F450B: my_mb_wc_utf8mb4_quick (ctype-utf8.h:166)
      ==678967==    by 0x17F956D: my_mb_wc_utf8mb4 (ctype-utf8.c:7528)
      ==678967==    by 0x17FE713: my_convert_fix (ctype.c:1306)
      ==678967==    by 0xBC0655: String_copier::well_formed_copy(charset_info_st const*, char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long) (sql_string.cc:1133)
      ==678967==    by 0xE6B6C4: Field_longstr::well_formed_copy_with_check(char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long, bool, unsigned int*) (field.h:2195)
      ==678967==    by 0xE5C43A: Field_varstring::store(char const*, unsigned long, charset_info_st const*) (field.cc:7843)
      ==678967==    by 0xC6ED23: Field::store_text(char const*, unsigned long, charset_info_st const*) (field.h:939)
      ==678967==    by 0xCF93B2: read_bucket_endpoint(st_json_engine_t*, Field*, String*, char const**) (opt_histogram_json.cc:496)
      ==678967==    by 0xCF997F: Histogram_json_hb::parse_bucket(st_json_engine_t*, Field*, double*, bool*, char const**) (opt_histogram_json.cc:605)
      ==678967==    by 0xCFA288: Histogram_json_hb::parse(st_mem_root*, char const*, char const*, Field*, enum_histogram_type, char const*, unsigned long) (opt_histogram_json.cc:785)
      ==678967==    by 0xBBAF07: Column_stat::load_histogram(st_mem_root*) (sql_statistics.cc:1236)
      ==678967==    by 0xBB56C6: read_histograms_for_table(THD*, TABLE*, TABLE_LIST*) (sql_statistics.cc:3198)
      ==678967==    by 0xBB5D49: read_statistics_for_tables(THD*, TABLE_LIST*) (sql_statistics.cc:3337)
      ==678967==    by 0xBB57F0: read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) (sql_statistics.cc:3246)
      ==678967==    by 0xA08F72: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5276)
      ==678967==    by 0x9BEC00: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:509)
      ==678967== Invalid read of size 1
      ==678967==    at 0x17F451F: my_mb_wc_utf8mb4_quick (ctype-utf8.h:169)
      ==678967==    by 0x17F956D: my_mb_wc_utf8mb4 (ctype-utf8.c:7528)
      ==678967==    by 0x17FE713: my_convert_fix (ctype.c:1306)
      ==678967==    by 0xBC0655: String_copier::well_formed_copy(charset_info_st const*, char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long) (sql_string.cc:1133)
      ==678967==    by 0xE6B6C4: Field_longstr::well_formed_copy_with_check(char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long, bool, unsigned int*) (field.h:2195)
      ==678967==    by 0xE5C43A: Field_varstring::store(char const*, unsigned long, charset_info_st const*) (field.cc:7843)
      ==678967==    by 0xC6ED23: Field::store_text(char const*, unsigned long, charset_info_st const*) (field.h:939)
      ==678967==    by 0xCF93B2: read_bucket_endpoint(st_json_engine_t*, Field*, String*, char const**) (opt_histogram_json.cc:496)
      ==678967==    by 0xCF997F: Histogram_json_hb::parse_bucket(st_json_engine_t*, Field*, double*, bool*, char const**) (opt_histogram_json.cc:605)
      ==678967==    by 0xCFA288: Histogram_json_hb::parse(st_mem_root*, char const*, char const*, Field*, enum_histogram_type, char const*, unsigned long) (opt_histogram_json.cc:785)
      ==678967==    by 0xBBAF07: Column_stat::load_histogram(st_mem_root*) (sql_statistics.cc:1236)
      ==678967==    by 0xBB56C6: read_histograms_for_table(THD*, TABLE*, TABLE_LIST*) (sql_statistics.cc:3198)
      ==678967==    by 0xBB5D49: read_statistics_for_tables(THD*, TABLE_LIST*) (sql_statistics.cc:3337)
      ==678967==    by 0xBB57F0: read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) (sql_statistics.cc:3246)
      ==678967==    by 0xA08F72: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5276)
      ==678967==    by 0x9BEC00: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:509)
      ==678967==  Address 0x172fe0cb is 59 bytes inside a block of size 64 free'd
      ==678967==    at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==678967==    by 0x1789F5F: my_free (my_malloc.c:211)
      ==678967==    by 0x1778EAC: root_free (my_alloc.c:78)
      ==678967==    by 0x1779C79: free_root (my_alloc.c:495)
      ==678967==    by 0xAB54A8: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) (sql_parse.cc:2449)
      ==678967==    by 0xAB2123: do_command(THD*, bool) (sql_parse.cc:1402)
      ==678967==    by 0xC8EB6C: do_handle_one_connection(CONNECT*, bool) (sql_connect.cc:1418)
      ==678967==    by 0xC8E7FC: handle_one_connection (sql_connect.cc:1312)
      ==678967==    by 0x11AFA5C: pfs_spawn_thread (pfs.cc:2201)
      ==678967==    by 0x4DC5608: start_thread (pthread_create.c:477)
      ==678967==    by 0x5255292: clone (clone.S:95)
      ==678967==  Block was alloc'd at
      ==678967==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==678967==    by 0x1789770: my_malloc (my_malloc.c:90)
      ==678967==    by 0x17793CF: alloc_root (my_alloc.c:287)
      ==678967==    by 0x931098: Query_arena::alloc(unsigned long) (sql_class.h:1209)
      ==678967==    by 0xEA738A: make_name(THD*, char const*, unsigned long, charset_info_st const*, unsigned long) (item.cc:1194)
      ==678967==    by 0xEA76C1: Item::set_name(THD*, char const*, unsigned long, charset_info_st const*) (item.cc:1258)
      ==678967==    by 0x97F7ED: Item::set_name(THD*, st_mysql_const_lex_string const&, charset_info_st const*) (item.h:1129)
      ==678967==    by 0x97FCB7: Item_string::Item_string(THD*, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, charset_info_st const*, Derivation) (item.h:4650)
      ==678967==    by 0x97FEB5: Item_partition_func_safe_string::Item_partition_func_safe_string(THD*, st_mysql_const_lex_string const&, unsigned int, charset_info_st const*) (item.h:4814)
      ==678967==    by 0x980011: Item_empty_string::Item_empty_string(THD*, char const*, unsigned int, charset_info_st const*) (item.h:4841)
      ==678967==    by 0xA5DB5F: mysqld_show_warnings(THD*, unsigned long) (sql_error.cc:808)
      ==678967==    by 0xAB9A5D: mysql_execute_command(THD*, bool) (sql_parse.cc:4014)
      ==678967==    by 0xAC7333: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:8028)
      ==678967==    by 0xAB3787: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) (sql_parse.cc:1894)
      ==678967==    by 0xAB2123: do_command(THD*, bool) (sql_parse.cc:1402)
      ==678967==    by 0xC8EB6C: do_handle_one_connection(CONNECT*, bool) (sql_connect.cc:1418)
      

      with MSAN

      ==241296==WARNING: MemorySanitizer: use-of-uninitialized-value
          #0 0x555e6fdab82c in my_mb_wc_utf8mb4_quick /home/jenkins/workspace/sandbox-elenst/MSAN/src/strings/ctype-utf8.h:142:7
          #1 0x555e6fdc57c0 in my_convert_fix /home/jenkins/workspace/sandbox-elenst/MSAN/src/strings/ctype.c:1306:18
          #2 0x555e6d235bff in String_copier::well_formed_copy(charset_info_st const*, char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/sql_string.cc:1133:17
          #3 0x555e6db278a6 in Field_longstr::well_formed_copy_with_check(char*, unsigned long, charset_info_st const*, char const*, unsigned long, unsigned long, bool, unsigned int*) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/field.h:2195:26
          #4 0x555e6db278a6 in Field_varstring::store(char const*, unsigned long, charset_info_st const*) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/field.cc:7843:7
          #5 0x555e6d61621f in read_bucket_endpoint(st_json_engine_t*, Field*, String*, char const**) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/opt_histogram_json.cc:496:12
          #6 0x555e6d617e5d in Histogram_json_hb::parse_bucket(st_json_engine_t*, Field*, double*, bool*, char const**) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/opt_histogram_json.cc:605:11
          #7 0x555e6d61a3f1 in Histogram_json_hb::parse(st_mem_root*, char const*, char const*, Field*, enum_histogram_type, char const*, unsigned long) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/opt_histogram_json.cc:785:20
          #8 0x555e6d22a625 in Column_stat::load_histogram(st_mem_root*) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/sql_statistics.cc:1236:18
          #9 0x555e6d20a4a3 in read_histograms_for_table(THD*, TABLE*, TABLE_LIST*) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/sql_statistics.cc:3198:23
          #10 0x555e6d20a4a3 in read_statistics_for_tables(THD*, TABLE_LIST*) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/sql_statistics.cc:3337:16
          #11 0x555e6d208298 in read_statistics_for_tables_if_needed(THD*, TABLE_LIST*) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/sql_statistics.cc:3246:12
          #12 0x555e6cc32b30 in open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/sql_base.cc:5276:12
          #13 0x555e6cebd4dc in open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/sql_base.h:509:10
          #14 0x555e6cebd4dc in execute_sqlcom_select(THD*, TABLE_LIST*) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/sql_parse.cc:6174:14
          #15 0x555e6ce980cf in mysql_execute_command(THD*, bool) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/sql_parse.cc:3944:12
          #16 0x555e6ce80007 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/sql_parse.cc:8028:18
          #17 0x555e6ce7419d in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/sql_parse.cc:1894:7
          #18 0x555e6ce8241c in do_command(THD*, bool) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/sql_parse.cc:1402:17
          #19 0x555e6d4f3c06 in do_handle_one_connection(CONNECT*, bool) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/sql_connect.cc:1418:11
          #20 0x555e6d4f3155 in handle_one_connection /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/sql_connect.cc:1312:5
          #21 0x555e6e85d001 in pfs_spawn_thread /home/jenkins/workspace/sandbox-elenst/MSAN/src/storage/perfschema/pfs.cc:2201:3
          #22 0x7f40da925608 in start_thread /build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
          #23 0x7f40da62a292 in clone /build/glibc-eX1tMB/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
       
        Uninitialized value was created by an allocation of 'je' in the stack frame of function '_ZN17Histogram_json_hb5parseEP11st_mem_rootPKcS3_P5Field19enum_histogram_typeS3_m'
          #0 0x555e6d619e20 in Histogram_json_hb::parse(st_mem_root*, char const*, char const*, Field*, enum_histogram_type, char const*, unsigned long) /home/jenkins/workspace/sandbox-elenst/MSAN/src/sql/opt_histogram_json.cc:738
       
      SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/jenkins/workspace/sandbox-elenst/MSAN/src/strings/ctype-utf8.h:142:7 in my_mb_wc_utf8mb4_quick
      Exiting
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              psergei Sergei Petrunia
              Reporter:
              elenst Elena Stepanova
              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.