Roel Van de Paar
added a comment - Confirmed. Trace with error type report:
export UBSAN_OPTIONS=suppressions=${HOME} /mariadb-qa/UBSAN .filter:print_stacktrace=1:report_error_type=1
CS 10.6.22 f1d7e0c17e33f77278e6226dd94aeb30fc856bf0 (Debug, UBASAN) Build 15/02/2025
/test/10.6_dbg_san/sql/sql_select.cc:31065:33: runtime error: inf is outside the range of representable values of type 'unsigned long long'
#0 0x55cd21c12dbb in test_if_cheaper_ordering(bool, st_join_table const*, st_order*, TABLE*, Bitmap<64u>, int, unsigned long long, int*, int*, unsigned long long*, double*, unsigned int*, unsigned int*) /test/10.6_dbg_san/sql/sql_select.cc:31065:33
#1 0x55cd21bb3942 in test_if_skip_sort_order(st_join_table*, st_order*, unsigned long long, bool, Bitmap<64u> const*, bool*) /test/10.6_dbg_san/sql/sql_select.cc:25564:5
#2 0x55cd21b8208f in JOIN::optimize_stage2() /test/10.6_dbg_san/sql/sql_select.cc:3334:15
#3 0x55cd21b8830c in JOIN::optimize_inner() /test/10.6_dbg_san/sql/sql_select.cc:2639:9
#4 0x55cd21b7a7cb in JOIN::optimize() /test/10.6_dbg_san/sql/sql_select.cc:1927:10
#5 0x55cd21b5c570 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*) /test/10.6_dbg_san/sql/sql_select.cc:5182:19
#6 0x55cd21b5b9a2 in handle_select(THD*, LEX*, select_result*, unsigned long) /test/10.6_dbg_san/sql/sql_select.cc:573:10
#7 0x55cd21a81ab5 in execute_sqlcom_select(THD*, TABLE_LIST*) /test/10.6_dbg_san/sql/sql_parse.cc:6422:12
#8 0x55cd21a6a119 in mysql_execute_command(THD*, bool) /test/10.6_dbg_san/sql/sql_parse.cc:4013:12
#9 0x55cd21a39b28 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:8209:18
#10 0x55cd21a2ddb4 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /test/10.6_dbg_san/sql/sql_parse.cc:1908:7
#11 0x55cd21a3c54d in do_command(THD*, bool) /test/10.6_dbg_san/sql/sql_parse.cc:1421:17
#12 0x55cd220836ec in do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1386:11
#13 0x55cd22082fab in handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1298:5
#14 0x55cd215433ac in asan_thread_start(void*) asan_interceptors.cpp.o
#15 0x14f78c49ca93 in start_thread nptl/pthread_create.c:447:8
#16 0x14f78c529c3b in clone3 misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
SUMMARY: UndefinedBehaviorSanitizer: float-cast-overflow /test/10.6_dbg_san/sql/sql_select.cc:31065:33
Please note that this will be the last UBSAN error trace in the log, there will likely be other issues before it, like:
UBSAN|applying zero offset to null pointer|storage/maria/ma_unique.c|_ma_unique_hash|maria_write|handler::ha_write_tmp_row|end_write
Which is MDEV-35620 .
Confirmed. Trace with error type report:
CS 10.6.22 f1d7e0c17e33f77278e6226dd94aeb30fc856bf0 (Debug, UBASAN) Build 15/02/2025
/test/10.6_dbg_san/sql/sql_select.cc:31065:33: runtime error: inf is outside the range of representable values of type 'unsigned long long'
#0 0x55cd21c12dbb in test_if_cheaper_ordering(bool, st_join_table const*, st_order*, TABLE*, Bitmap<64u>, int, unsigned long long, int*, int*, unsigned long long*, double*, unsigned int*, unsigned int*) /test/10.6_dbg_san/sql/sql_select.cc:31065:33
#1 0x55cd21bb3942 in test_if_skip_sort_order(st_join_table*, st_order*, unsigned long long, bool, Bitmap<64u> const*, bool*) /test/10.6_dbg_san/sql/sql_select.cc:25564:5
#2 0x55cd21b8208f in JOIN::optimize_stage2() /test/10.6_dbg_san/sql/sql_select.cc:3334:15
#3 0x55cd21b8830c in JOIN::optimize_inner() /test/10.6_dbg_san/sql/sql_select.cc:2639:9
#4 0x55cd21b7a7cb in JOIN::optimize() /test/10.6_dbg_san/sql/sql_select.cc:1927:10
#5 0x55cd21b5c570 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*) /test/10.6_dbg_san/sql/sql_select.cc:5182:19
#6 0x55cd21b5b9a2 in handle_select(THD*, LEX*, select_result*, unsigned long) /test/10.6_dbg_san/sql/sql_select.cc:573:10
#7 0x55cd21a81ab5 in execute_sqlcom_select(THD*, TABLE_LIST*) /test/10.6_dbg_san/sql/sql_parse.cc:6422:12
#8 0x55cd21a6a119 in mysql_execute_command(THD*, bool) /test/10.6_dbg_san/sql/sql_parse.cc:4013:12
#9 0x55cd21a39b28 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:8209:18
#10 0x55cd21a2ddb4 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /test/10.6_dbg_san/sql/sql_parse.cc:1908:7
#11 0x55cd21a3c54d in do_command(THD*, bool) /test/10.6_dbg_san/sql/sql_parse.cc:1421:17
#12 0x55cd220836ec in do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1386:11
#13 0x55cd22082fab in handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1298:5
#14 0x55cd215433ac in asan_thread_start(void*) asan_interceptors.cpp.o
#15 0x14f78c49ca93 in start_thread nptl/pthread_create.c:447:8
#16 0x14f78c529c3b in clone3 misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
SUMMARY: UndefinedBehaviorSanitizer: float-cast-overflow /test/10.6_dbg_san/sql/sql_select.cc:31065:33
Please note that this will be the last UBSAN error trace in the log, there will likely be other issues before it, like:
UBSAN|applying zero offset to null pointer|storage/maria/ma_unique.c|_ma_unique_hash|maria_write|handler::ha_write_tmp_row|end_write
Which is
MDEV-35620.