Details
Description
When the server is built with cmake -DWITH_UBSAN=ON using clang instead of GCC, a lot of function pointer mismatch will be reported for various traversal of lock-free hash tables:
10.4 96130b1898d34222d1f0543d75dc1acb6cdb8b09 |
/mariadb/10.4/storage/innobase/include/trx0sys.h:534:12: runtime error: call to function trx_sys_t::copy_one_id(rw_trx_hash_element_t*, trx_sys_t::snapshot_ids_arg*) through pointer to incorrect function type 'char (*)(void *, void *)'
|
/mariadb/10.4/storage/innobase/include/trx0sys.h:1155: note: trx_sys_t::copy_one_id(rw_trx_hash_element_t*, trx_sys_t::snapshot_ids_arg*) defined here
|
Attachments
Issue Links
- blocks
-
MDEV-34348 MariaDB is violating clang-16 -Wcast-function-type-strict
-
- Closed
-
- is blocked by
-
MDEV-26272 The macro MASTER_INFO_VAR invokes undefined behaviour
-
- Closed
-
- is caused by
-
MDEV-14638 Replace trx_sys_t::rw_trx_set with LF_HASH
-
- Closed
-
- relates to
-
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 *)'
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue is blocked by |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Assignee | Marko Mäkelä [ marko ] |
Fix Version/s | 11.0 [ 28320 ] | |
Fix Version/s | 11.3 [ 28565 ] |
Link |
This issue relates to |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Link |
This issue is caused by |
Summary | my_hash_walk_action leads to undefined behaviour | Function pointer signature mismatch in LF_HASH |
Assignee | Marko Mäkelä [ marko ] | Vladislav Vaintroub [ wlad ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Link |
This issue blocks |
issue.field.resolutiondate | 2024-06-10 10:12:29.0 | 2024-06-10 10:12:29.408 |
Fix Version/s | 10.5.26 [ 29832 ] | |
Fix Version/s | 10.6.19 [ 29833 ] | |
Fix Version/s | 10.11.9 [ 29834 ] | |
Fix Version/s | 11.1.6 [ 29835 ] | |
Fix Version/s | 11.2.5 [ 29836 ] | |
Fix Version/s | 11.4.3 [ 29837 ] | |
Fix Version/s | 11.5.2 [ 29838 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.11 [ 27614 ] | |
Fix Version/s | 11.1 [ 28549 ] | |
Fix Version/s | 11.2 [ 28603 ] | |
Assignee | Vladislav Vaintroub [ wlad ] | Marko Mäkelä [ marko ] |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Here is another example that is related to trx_sys.rw_trx_hash:
10.5 bf0aa99aeb7dd2bb7497f5ae9a82d1e72e7ee1d5
mysys/lf_hash.cc:419:3: runtime error: call to function rw_trx_hash_t::rw_trx_hash_initializer(st_lf_hash*, rw_trx_hash_element_t*, trx_t*) through pointer to incorrect function type 'void (*)(st_lf_hash *, void *, const void *)'