Description:
(Category is probably incorrect. I'd have chosen "MySQL Server: Plugin Support" if it existed)
./mtr clone.remote_basic_replace
...
mysqltest: At line 86: Query 'INSTALL PLUGIN clone SONAME '$CLONE_PLUGIN'' failed.
ERROR 2013 (HY000): Lost connection to MySQL server during query
...
var/log/mysqld.1.err:
...
2024-10-16T11:19:36.307709Z 9 [Note] [MY-010733] [Server] Shutting down plugin 'clone'
=================================================================
==90628==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000143f62580 at pc 0x000102956efc bp 0x000170f44490 sp 0x000170f44488
READ of size 8 at 0x000143f62580 thread T48
#0 0x102956ef8 in plugin_dl_add(MYSQL_LEX_STRING const*, int, bool) sql_plugin.cc:744
#1 0x1029540b0 in plugin_add(MEM_ROOT*, MYSQL_LEX_CSTRING, MYSQL_LEX_STRING const*, int*, char**, int, bool) sql_plugin.cc:1047
#2 0x1029416dc in mysql_install_plugin(THD*, MYSQL_LEX_CSTRING, MYSQL_LEX_STRING const*) sql_plugin.cc:2358
#3 0x1029409f8 in Sql_cmd_install_plugin::execute(THD*) sql_plugin.cc:3689
#4 0x10286973c in mysql_execute_command(THD*, bool) sql_parse.cc:4722
#5 0x10285d4cc in dispatch_sql_command(THD*, Parser_state*) sql_parse.cc:5371
#6 0x1028481d4 in dispatch_command(THD*, COM_DATA const*, enum_server_command) sql_parse.cc:2055
#7 0x10285555c in do_command(THD*) sql_parse.cc:1440
#8 0x103166408 in handle_connection(void*) connection_handler_per_thread.cc:303
#9 0x107987bcc in pfs_spawn_thread(void*) pfs.cc:3050
#10 0x11cba1858 in asan_thread_start(void*)+0x40 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x51858)
#11 0x18f8132e0 in _pthread_start+0x84 (libsystem_pthread.dylib:arm64e+0x72e0)
#12 0x18f80e0f8 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x20f8)
0x000143f62580 is located 32 bytes before global variable 'mysql_malloc_service' defined in '/Users/laurynas/vilniusdb/mysql-8.0.40/libservices/mysql_malloc_service.c' (0x143f625a0) of size 8
0x000143f62580 is located 0 bytes inside of global variable 'thd_alloc_service' defined in '/Users/laurynas/vilniusdb/mysql-8.0.40/libservices/thd_alloc_service.c' (0x143f62580) of size 8
AddressSanitizer:DEADLYSIGNAL
How to repeat:
XCode 16
-DFORCE_UNSUPPORTED_COMPILER=ON -DCMAKE_BUILD_TYPE=Debug -DWITH_DEBUG=ON
-DMYSQL_MAINTAINER_MODE=ON -DWITH_SYSTEM_LIBS=ON
-DWITH_NDBCLUSTER_STORAGE_ENGINE=OFF -DDOWNLOAD_BOOST=ON
-DWITH_BOOST=<path> -DFORCE_COLORED_OUTPUT=ON -DCMAKE_CXX_FLAGS=-g
-DCMAKE_CXX_FLAGS_DEBUG=-g -DCMAKE_CXX_FLAGS_RELEASE=-O2 -DNDEBUG -g
-DWITH_ASAN=ON -DWITH_ASAN_SCOPE=ON -DWITH_UBSAN=ON