Added better examples of asan debugging use with gcc and clang

This commit is contained in:
Landon Curt Noll
2022-01-13 11:11:32 -08:00
parent cb77888045
commit dcd5a987af

View File

@@ -21,10 +21,19 @@
# #
# CFLAGS+= -Ofast # CFLAGS+= -Ofast
# For example, on macOS 12.1, you can use the following lines to # For example, a AddressSanitizer. You do NOT want to do this by
# invoke clang's AddressSanitizer. You do NOT want to do this by # by default! Do this only if you are debugging with libasan:
# by default! Do this only if you are debugging calc using clang.
# #
# For Linux gcc version 4.8.5 with libasan-4.8.5-4 you might try:
#
# CDEBUG:= -O0 -g
# CFLAGS+= -fsanitize=address -fno-omit-frame-pointer # CFLAGS+= -fsanitize=address -fno-omit-frame-pointer
# LDFLAGS+= -fsanitize=address -fno-omit-frame-pointer # LDFLAGS+= -fsanitize=address -fno-omit-frame-pointer
# CALC_ENV+= ASAN_OPTIONS=detect_stack_use_after_return=1 # CALC_ENV+= ASAN_OPTIONS=detect_stack_use_after_return=1
#
# For macOS 12.1 with clang version 13.0.0 (clang-1300.0.29.30) you might try:
#
# CDEBUG:= -O0 -g
# CFLAGS+= -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined
# LDFLAGS+= -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined
# CALC_ENV+= ASAN_OPTIONS=detect_stack_use_after_return=1