Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 10.6
-
None
Description
While testing the fix of MDEV-35723, I found out that when the test innodb.innodb is run on a clang-16 -DWITH_UBSAN=ON executable, there will be two errors inside my_coll_init_uca(), for initializing the tables of my_charset_utf8mb3_unicode_ci:
10.5 f521b8ac219102332eec99f854809e6331b3dbce |
innodb.innodb [ fail ] Found warnings/errors in server log file!
|
Test ended at 2025-01-17 12:15:13
|
line
|
/mariadb/10.5/sql/sql_statistics.h:479:35: runtime error: -nan is outside the range of representable values of type 'unsigned long long'
|
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /mariadb/10.5/sql/sql_statistics.h:479:35 in
|
/mariadb/10.5/strings/ctype-uca.c:33538:43: runtime error: applying zero offset to null pointer
|
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /mariadb/10.5/strings/ctype-uca.c:33538:43 in
|
/mariadb/10.5/strings/ctype-uca.c:33670:43: runtime error: applying zero offset to null pointer
|
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /mariadb/10.5/strings/ctype-uca.c:33670:43 in
|
The first error might share a root cause with MDEV-35721.
With the following, I got nice stack traces for each of these:
./mtr --rr innodb.innodb
|
rr replay mysql-test/var/log/mysqld.1.rr/latest-trace
|
break __ubsan::ScopedReport::~ScopedReport()
|
continue
|
backtrace
|
continue
|
backtrace
|
continue
|
backtrace
|
Note that GCC -fsanitize=undefined does not flag this class of errors; Clang does.
Attachments
Issue Links
- relates to
-
MDEV-35721 UBSAN: runtime error: -nan is outside the range of representable values of type 'unsigned long long' in Index_statistics::set_avg_frequency on INSERT or SHOW INDEX
-
- In Review
-
-
MDEV-35723 UBSAN: applying non-zero offset to null pointer in my_charpos_mb/my_uca_scanner_next_utf8mb4, applying zero offset to null pointer in my_strnncollsp_simple, my_uca_strnncollsp_onelevel_utf8mb4/my_uca_scanner_init_any/my_uca_scanner_next_utf8mb4 on INSERT
-
- Closed
-
-
MDEV-35872 UBSAN: runtime error: applying zero offset to null pointer on CLI init in ctype-uca.c
-
- Confirmed
-