mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
MDEV-26541 Make UBSAN builds work with spider again.
When built with ubsan and trying to load the spider plugin, the hidden visibility of mysqld compiling flag causes ha_spider.so to be missing the symbol ha_partition. This commit fixes that, as well as some memcpy null pointer issues when built with ubsan. Signed-off-by: Yuchen Pei <yuchen.pei@mariadb.com>
This commit is contained in:
parent
284ac6f2b7
commit
a68b9dd993
5 changed files with 215 additions and 107 deletions
|
|
@ -197,6 +197,15 @@ FOREACH(se aria partition perfschema sql_sequence wsrep)
|
|||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
IF(VISIBILITY_HIDDEN_FLAG AND TARGET partition AND WITH_UBSAN)
|
||||
# the spider plugin needs some partition symbols from inside mysqld
|
||||
# when built with ubsan, in which case we need to remove
|
||||
# -fvisibility=hidden from partition
|
||||
GET_TARGET_PROPERTY(f partition COMPILE_FLAGS)
|
||||
STRING(REPLACE "${VISIBILITY_HIDDEN_FLAG}" "" f ${f})
|
||||
SET_TARGET_PROPERTIES(partition PROPERTIES COMPILE_FLAGS "${f}")
|
||||
ENDIF()
|
||||
|
||||
IF(WIN32)
|
||||
SET(MYSQLD_SOURCE main.cc nt_servc.cc message.rc)
|
||||
TARGET_LINK_LIBRARIES(sql psapi)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue