Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable AddressSanitizer #46

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ GDB_FLAGS=
# TARGET_CFLAGS will be configured automatically by configure
TARGET_CFLAGS=

CRASH_CFLAGS=-g -D${TARGET} ${TARGET_CFLAGS} ${GDB_FLAGS} ${CFLAGS}
CRASH_CFLAGS=-g -O0 -D${TARGET} ${TARGET_CFLAGS} ${GDB_FLAGS} ${CFLAGS} -fsanitize=address

GPL_FILES=
TAR_FILES=${SOURCE_FILES} Makefile ${GPL_FILES} README .rh_rpm_package crash.8 \
Expand Down Expand Up @@ -228,7 +228,7 @@ all: make_configure
gdb_merge: force
@if [ ! -f ${GDB}/README ]; then \
make --no-print-directory gdb_unzip; fi
@echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs
@echo "${LDFLAGS} -lz -ldl -rdynamic -fsanitize=address" > ${GDB}/gdb/mergelibs
@echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj
@rm -f ${PROGRAM}
@if [ ! -f ${GDB}/config.status ]; then \
Expand Down Expand Up @@ -538,7 +538,7 @@ ${PROGRAM}d: daemon_deprecated make_configure
@make --no-print-directory daemon

daemon: ${DAEMON_OBJECT_FILES}
${CC} ${LDFLAGS} -o ${PROGRAM}d ${DAEMON_OBJECT_FILES} build_data.o -lz
${CC} ${LDFLAGS} -o ${PROGRAM}d ${DAEMON_OBJECT_FILES} build_data.o -lz -fsanitize=address

files: make_configure
@./configure -q -b
Expand Down