mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-35687 Various UBSAN function-type-mismatch debug_sync and myisam
storage/maria/ma_open.c:352:7: runtime error: call to function debug_sync(THD*, char const*, unsigned long) through pointer to incorrect function type 'void (*)(void *, const char *, unsigned long)' The THD argument is a void *. Because of the way myisam is .c files the function prototype is mismatched. As Marko pointed out the MYSQL_THD is declared as void * in C. Thanks Jimmy Hú for noting that struct THD is the equalivalant in C to the class THD. The C NULL was also different to the C++ nullptr. Corrected the definations of MYSQL_THD and DEBUG_SYNC_C to be C and C++ compatible.
This commit is contained in:
@@ -44,7 +44,8 @@ class THD;
|
||||
class Item;
|
||||
#define MYSQL_THD THD*
|
||||
#else
|
||||
#define MYSQL_THD void*
|
||||
struct THD;
|
||||
typedef struct THD* MYSQL_THD;
|
||||
#endif
|
||||
|
||||
typedef char my_bool;
|
||||
|
Reference in New Issue
Block a user