Skip to content

Commit f6da0e2

Browse files
ASAN options in MDB config
1 parent 70da065 commit f6da0e2

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
@@ -441,7 +441,27 @@ build_binary() {
441441

442442
generate_svgs
443443

444-
${CMAKE_BIN_NAME} --build "$MARIA_BUILD_PATH" -j "$CPUS" | onelinearizator &&
444+
${CMAKE_BIN_NAME} --build "$MARIA_BUILD_PATH" -j "$CPUS" | onelinearizator || exit 1
445+
THREAD_STACK_SIZE="20M"
446+
447+
SYSTEMD_SERVICE_DIR="$MARIA_BUILD_PATH/support-files"
448+
MDB_SERVICE_FILE=$SYSTEMD_SERVICE_DIR/mariadb.service
449+
COLUMNSTORE_CONFIG=$CONFIG_DIR/columnstore.cnf
450+
if [[ $ASAN = true ]]; then
451+
#if grep -q thread_stack $COLUMNSTORE_CONFIG; then
452+
# warn "MDB Server has thread_stack settings on $COLUMNSTORE_CONFIG check it's compatibility with ASAN"
453+
#else
454+
# echo "thread_stack = ${THREAD_STACK_SIZE}" >>$COLUMNSTORE_CONFIG
455+
# message "thread_stack was set to ${THREAD_STACK_SIZE} in $COLUMNSTORE_CONFIG"
456+
#fi
457+
458+
if grep -q ASAN $MDB_SERVICE_FILE; then
459+
warn "MDB Server has ASAN options in $MDB_SERVICE_FILE, check it's compatibility"
460+
else
461+
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
462+
message "ASAN options were added to $MDB_SERVICE_FILE"
463+
fi
464+
fi
445465
message "Installing silently" &&
446466
${CMAKE_BIN_NAME} --install "$MARIA_BUILD_PATH" | spinner 30
447467

0 commit comments

Comments
 (0)