Skip to content

Commit c475252

Browse files
ASAN options in MDB config
1 parent bd2d6bf commit c475252

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
@@ -477,7 +477,27 @@ build_binary() {
477477
check_debian_install_file
478478
generate_svgs
479479

480-
${CMAKE_BIN_NAME} --build "$MARIA_BUILD_PATH" -j "$CPUS" | onelinearizator &&
480+
${CMAKE_BIN_NAME} --build "$MARIA_BUILD_PATH" -j "$CPUS" | onelinearizator || exit 1
481+
THREAD_STACK_SIZE="20M"
482+
483+
SYSTEMD_SERVICE_DIR="$MARIA_BUILD_PATH/support-files"
484+
MDB_SERVICE_FILE=$SYSTEMD_SERVICE_DIR/mariadb.service
485+
COLUMNSTORE_CONFIG=$CONFIG_DIR/columnstore.cnf
486+
if [[ $ASAN = true ]]; then
487+
#if grep -q thread_stack $COLUMNSTORE_CONFIG; then
488+
# warn "MDB Server has thread_stack settings on $COLUMNSTORE_CONFIG check it's compatibility with ASAN"
489+
#else
490+
# echo "thread_stack = ${THREAD_STACK_SIZE}" >>$COLUMNSTORE_CONFIG
491+
# message "thread_stack was set to ${THREAD_STACK_SIZE} in $COLUMNSTORE_CONFIG"
492+
#fi
493+
494+
if grep -q ASAN $MDB_SERVICE_FILE; then
495+
warn "MDB Server has ASAN options in $MDB_SERVICE_FILE, check it's compatibility"
496+
else
497+
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
498+
message "ASAN options were added to $MDB_SERVICE_FILE"
499+
fi
500+
fi
481501
message "Installing silently" &&
482502
${CMAKE_BIN_NAME} --install "$MARIA_BUILD_PATH" | spinner 30
483503

0 commit comments

Comments
 (0)