Skip to content

Commit 037acc6

Browse files
ASAN options in MDB config
1 parent d47ac25 commit 037acc6

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

build/bootstrap_mcs.sh

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,27 @@ build_binary() {
464464
check_debian_install_file
465465
generate_svgs
466466

467-
${CMAKE_BIN_NAME} --build "$MARIA_BUILD_PATH" -j "$CPUS" | onelinearizator &&
467+
${CMAKE_BIN_NAME} --build "$MARIA_BUILD_PATH" -j "$CPUS" | onelinearizator || exit 1
468+
THREAD_STACK_SIZE="20M"
469+
470+
SYSTEMD_SERVICE_DIR="$MARIA_BUILD_PATH/support-files"
471+
MDB_SERVICE_FILE=$SYSTEMD_SERVICE_DIR/mariadb.service
472+
COLUMNSTORE_CONFIG=$CONFIG_DIR/columnstore.cnf
473+
if [[ $ASAN = true ]]; then
474+
#if grep -q thread_stack $COLUMNSTORE_CONFIG; then
475+
# warn "MDB Server has thread_stack settings on $COLUMNSTORE_CONFIG check it's compatibility with ASAN"
476+
#else
477+
# echo "thread_stack = ${THREAD_STACK_SIZE}" >>$COLUMNSTORE_CONFIG
478+
# message "thread_stack was set to ${THREAD_STACK_SIZE} in $COLUMNSTORE_CONFIG"
479+
#fi
480+
481+
if grep -q ASAN $MDB_SERVICE_FILE; then
482+
warn "MDB Server has ASAN options in $MDB_SERVICE_FILE, check it's compatibility"
483+
else
484+
echo Environment="'ASAN_OPTIONS=abort_on_error=1:disable_coredump=0,print_stats=false,detect_odr_violation=0,check_initialization_order=1,detect_stack_use_after_return=1,atexit=false,log_path=${REPORT_PATH}/asan.mariadb'" >>$MDB_SERVICE_FILE
485+
message "ASAN options were added to $MDB_SERVICE_FILE"
486+
fi
487+
fi
468488
message "Installing silently" &&
469489
${CMAKE_BIN_NAME} --install "$MARIA_BUILD_PATH" | spinner 30
470490

0 commit comments

Comments
 (0)