From 0428faf12dab1752f6753cd0530ab4568308d461 Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Wed, 18 Dec 2019 16:28:49 +0100 Subject: [PATCH] Project mysql with ubsan build (#3150) --- projects/mysql-server/build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/mysql-server/build.sh b/projects/mysql-server/build.sh index 4cfc3b416..9f9afe60b 100644 --- a/projects/mysql-server/build.sh +++ b/projects/mysql-server/build.sh @@ -20,7 +20,11 @@ cd mysql-server git apply ../fix.diff mkdir build cd build -cmake .. -Dprotobuf_BUILD_SHARED_LIBS=OFF -DDOWNLOAD_BOOST=1 -DWITH_BOOST=. -DWITH_SSL=system -DFUZZING=1 -DCMAKE_INSTALL_PREFIX=$OUT/mysql +if [[ $SANITIZER = *undefined* ]]; then + cmake .. -Dprotobuf_BUILD_SHARED_LIBS=OFF -DDOWNLOAD_BOOST=1 -DWITH_BOOST=. -DWITH_SSL=system -DFUZZING=1 -DCMAKE_INSTALL_PREFIX=$OUT/mysql -DWITH_UBSAN=1 +else + cmake .. -Dprotobuf_BUILD_SHARED_LIBS=OFF -DDOWNLOAD_BOOST=1 -DWITH_BOOST=. -DWITH_SSL=system -DFUZZING=1 -DCMAKE_INSTALL_PREFIX=$OUT/mysql +fi make install cp $OUT/mysql/bin/fuzz* $OUT/ cp ../fuzz/fuzz*.options $OUT/