You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/11/02 17:02:55 UTC
[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4776: sim host ASAN improvement
gustavonihei commented on a change in pull request #4776:
URL: https://github.com/apache/incubator-nuttx/pull/4776#discussion_r741297136
##########
File path: boards/sim/sim/sim/scripts/Make.defs
##########
@@ -200,11 +205,15 @@ ifeq ($(CONFIG_SIM_M32),y)
HOSTLDFLAGS += -m32
endif
-ifeq ($(CONFIG_SIM_SANITIZE),y)
- CCLINKFLAGS += -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer
+ifeq ($(CONFIG_SIM_ASAN),y)
+ CCLINKFLAGS += -fsanitize=address -fno-omit-frame-pointer
else ifeq ($(CONFIG_MM_KASAN),y)
CCLINKFLAGS += -fsanitize=kernel-address
endif
+ifeq ($(CONFIG_SIM_UBSAN),y)
+ CCLINKFLAGS += -fsanitize=undefined
Review comment:
According to [clang documentation](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#stack-traces-and-report-symbolization), `-fno-omit-frame-pointer` also contributes to UBSan.
Consider adding it via a hidden Kconfig option that is selected when either ASan or UBSan is selected.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org