gustavonihei commented on a change in pull request #4743: URL: https://github.com/apache/incubator-nuttx/pull/4743#discussion_r740459260
########## File path: arch/arm/src/arm/Toolchain.defs ########## @@ -67,6 +67,10 @@ else MAXOPTIMIZATION ?= -Os endif +ifeq ($(CONFIG_MM_KASAN),y) + MAXOPTIMIZATION += -fsanitize=kernel-address Review comment: Adding it as an "optimization option" seems conceptually wrong. We should create another variable for the instrumentation options. ########## File path: tools/ci/testlist/sim-01.dat ########## @@ -6,16 +6,19 @@ -Darwin,sim:cxxtest -Darwin,sim:libcxxtest -# Do not build Linux configs --Darwin,sim:linuxi2c --Darwin,sim:linuxspi +# clang doesn't -fsanitize=kernel-address +-Darwin,sim:kasan Review comment: Is this really true? Or this lack of support is just that it has not been verified to work with NuttX? Clang seems to support kernel address sanitizers for a long time. ########## File path: tools/ci/testlist/sim-01.dat ########## @@ -6,16 +6,19 @@ -Darwin,sim:cxxtest -Darwin,sim:libcxxtest -# Do not build Linux configs --Darwin,sim:linuxi2c --Darwin,sim:linuxspi +# clang doesn't -fsanitize=kernel-address +-Darwin,sim:kasan Review comment: Is this really true? Or this lack of support is just that it has not been verified to work with NuttX? Clang seems to support kernel address sanitizers for a long time. https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/Sanitizers.def#L49-L50 ########## File path: tools/ci/testlist/sim-01.dat ########## @@ -6,16 +6,19 @@ -Darwin,sim:cxxtest -Darwin,sim:libcxxtest -# Do not build Linux configs --Darwin,sim:linuxi2c --Darwin,sim:linuxspi +# clang doesn't -fsanitize=kernel-address +-Darwin,sim:kasan Review comment: It seems that the `LLVM/clang` that ships with macOS somehow does not support sanitizers: https://stackoverflow.com/questions/65112164/how-to-resolve-clang-error-unsupported-option-fsanitize-leak-on-apple-dev Let's address it later. Probably we would need to install the host toolchain (either clang or GCC) from Homwbrew to make it work properly. -- 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-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org