[MDEV-33161] my_hash_walk_action leads to undefined behaviour Created: 2024-01-03  Updated: 2024-01-03

Status: Confirmed
Project: MariaDB Server
Component/s: Server, Storage Engine - InnoDB
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2, 11.3
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2, 11.3

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Unresolved Votes: 0
Labels: UBSAN

Issue Links:
Blocks
is blocked by MDEV-26272 The macro MASTER_INFO_VAR invokes und... Closed

 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


Generated at Thu Feb 08 10:36:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.