Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4(EOL), 10.5, 10.6, 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL)
-
None
Description
set div_precision_increment= 0; |
select ifnull(1/2,0) > 0; |
10.4 0c7af6a2 Valgrind |
==2171252== Thread 6:
|
==2171252== Conditional jump or move depends on uninitialised value(s)
|
==2171252== at 0x16E2EED: do_sub (decimal.c:1911)
|
==2171252== by 0x16E372F: decimal_cmp (decimal.c:2060)
|
==2171252== by 0x91E872: my_decimal::cmp(my_decimal const*) const (my_decimal.h:183)
|
==2171252== by 0x91EEA7: Dec_ptr::cmp(my_decimal const*) const (sql_type.h:291)
|
==2171252== by 0x91EECF: Dec_ptr::cmp(Dec_ptr const&) const (sql_type.h:295)
|
==2171252== by 0xD46D81: Arg_comparator::compare_decimal() (item_cmpfunc.cc:881)
|
==2171252== by 0xD5FB13: Arg_comparator::compare() (item_cmpfunc.h:104)
|
==2171252== by 0xD4A3E0: Item_func_gt::val_int() (item_cmpfunc.cc:1829)
|
==2171252== by 0xBE1042: Type_handler::Item_send_long(Item*, Protocol*, st_value*) const (sql_type.cc:7106)
|
==2171252== by 0xBED885: Type_handler_long::Item_send(Item*, Protocol*, st_value*) const (sql_type.h:5191)
|
==2171252== by 0x8557D9: Item::send(Protocol*, st_value*) (item.h:1044)
|
==2171252== by 0x84F05B: Protocol::send_result_set_row(List<Item>*) (protocol.cc:1038)
|
==2171252== by 0x910C4B: select_send::send_data(List<Item>&) (sql_class.cc:3138)
|
==2171252== by 0x9E2E9F: JOIN::exec_inner() (sql_select.cc:4473)
|
==2171252== by 0x9E2705: JOIN::exec() (sql_select.cc:4387)
|
==2171252== by 0x9E3F0A: mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:4826)
|
==2171252==
|
10.6 8941bdc47 MSAN |
==2172085==WARNING: MemorySanitizer: use-of-uninitialized-value
|
#0 0x562f87f49a6a in do_sub /data/src/10.6-msan/strings/decimal.c:1921:7
|
#1 0x562f87f49d48 in decimal_cmp /data/src/10.6-msan/strings/decimal.c:2070:12
|
#2 0x562f85e037fa in Dec_ptr::cmp(Dec_ptr const&) const /data/src/10.6-msan/sql/sql_type.h:474:12
|
#3 0x562f85e037fa in Arg_comparator::compare_decimal() /data/src/10.6-msan/sql/item_cmpfunc.cc:925:19
|
#4 0x562f85e0cda1 in Arg_comparator::compare() /data/src/10.6-msan/sql/item_cmpfunc.h:103:33
|
#5 0x562f85e0cda1 in Item_func_gt::val_int() /data/src/10.6-msan/sql/item_cmpfunc.cc:1875:18
|
#6 0x562f858c5fa2 in Type_handler::Item_send_long(Item*, Protocol*, st_value*) const /data/src/10.6-msan/sql/sql_type.cc:7482:22
|
#7 0x562f858c5fa2 in Type_handler_long::Item_send(Item*, Protocol*, st_value*) const /data/src/10.6-msan/sql/sql_type.h:5743:12
|
#8 0x562f84b6b20d in Protocol::send_result_set_row(List<Item>*) /data/src/10.6-msan/sql/protocol.cc:1330:15
|
#9 0x562f84dfd51d in select_send::send_data(List<Item>&) /data/src/10.6-msan/sql/sql_class.cc:3150:17
|
#10 0x562f85153986 in select_result_sink::send_data_with_check(List<Item>&, st_select_lex_unit*, unsigned long long) /data/src/10.6-msan/sql/sql_class.h:5802:12
|
#11 0x562f85153986 in JOIN::exec_inner() /data/src/10.6-msan/sql/sql_select.cc:4700:22
|
#12 0x562f8514e547 in JOIN::exec() /data/src/10.6-msan/sql/sql_select.cc:4612:3
|
#13 0x562f850b57d0 in mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) /data/src/10.6-msan/sql/sql_select.cc:5091:9
|
#14 0x562f850b41e6 in handle_select(THD*, LEX*, select_result*, unsigned long) /data/src/10.6-msan/sql/sql_select.cc:559:10
|
#15 0x562f84fe964a in execute_sqlcom_select(THD*, TABLE_LIST*) /data/src/10.6-msan/sql/sql_parse.cc:6285:12
|
#16 0x562f84fc32fe in mysql_execute_command(THD*, bool) /data/src/10.6-msan/sql/sql_parse.cc:3961:12
|
#17 0x562f84faad5a in mysql_parse(THD*, char*, unsigned int, Parser_state*) /data/src/10.6-msan/sql/sql_parse.cc:8050:18
|
#18 0x562f84f9f2a0 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /data/src/10.6-msan/sql/sql_parse.cc:1896:7
|
#19 0x562f84fad150 in do_command(THD*, bool) /data/src/10.6-msan/sql/sql_parse.cc:1409:17
|
#20 0x562f855dce9f in do_handle_one_connection(CONNECT*, bool) /data/src/10.6-msan/sql/sql_connect.cc:1416:11
|
#21 0x562f855dc485 in handle_one_connection /data/src/10.6-msan/sql/sql_connect.cc:1318:5
|
#22 0x562f86a514ca in pfs_spawn_thread /data/src/10.6-msan/storage/perfschema/pfs.cc:2201:3
|
#23 0x7f96dfeb1fd3 in start_thread nptl/./nptl/pthread_create.c:442:8
|
#24 0x7f96dff325bb in clone3 misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
|
Uninitialized value was stored to memory at
|
#0 0x562f858742d3 in my_decimal::operator=(my_decimal const&) /data/src/10.6-msan/sql/my_decimal.h:134:16
|
#1 0x562f858742d3 in Dec_ptr::to_decimal(my_decimal*) const /data/src/10.6-msan/sql/sql_type.h:443:8
|
#2 0x562f858742d3 in Type_handler_decimal_result::Item_func_hybrid_field_type_val_decimal(Item_func_hybrid_field_type*, my_decimal*) const /data/src/10.6-msan/sql/sql_type.cc:5351:24
|
|
Uninitialized value was stored to memory at
|
#0 0x562f858742d3 in my_decimal::operator=(my_decimal const&) /data/src/10.6-msan/sql/my_decimal.h:134:16
|
#1 0x562f858742d3 in Dec_ptr::to_decimal(my_decimal*) const /data/src/10.6-msan/sql/sql_type.h:443:8
|
#2 0x562f858742d3 in Type_handler_decimal_result::Item_func_hybrid_field_type_val_decimal(Item_func_hybrid_field_type*, my_decimal*) const /data/src/10.6-msan/sql/sql_type.cc:5351:24
|
|
Memory was marked as uninitialized
|
#0 0x562f84a9eeee in __msan_allocated_memory (/mnt8t/src/10.6-msan/sql/mariadbd+0x799eee)
|
#1 0x562f8583066d in my_decimal::init() /data/src/10.6-msan/sql/my_decimal.h:147:5
|
#2 0x562f8583066d in my_decimal::my_decimal() /data/src/10.6-msan/sql/my_decimal.h:152:5
|
#3 0x562f8583066d in Dec_ptr_and_buffer::Dec_ptr_and_buffer() /data/src/10.6-msan/sql/sql_type.h:480:7
|
#4 0x562f8583066d in VDec_op::VDec_op(Item_func_hybrid_field_type*) /data/src/10.6-msan/sql/sql_type.cc:298:10
|
|
SUMMARY: MemorySanitizer: use-of-uninitialized-value /data/src/10.6-msan/strings/decimal.c:1921:7 in do_sub
|
Exiting
|