mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:07:45 +00:00
Meta: Add option to disable Kernel Address Sanitizer
By default we enable the Kernel Undefined Behavior Sanitizer, which checks for undefined behavior at runtime. However, sometimes a developer might want to turn that off, so now there is a easy way to do that.
This commit is contained in:
parent
1461a7601d
commit
cc7723b6c4
3 changed files with 6 additions and 2 deletions
|
@ -547,8 +547,10 @@ elseif (ENABLE_USERSPACE_COVERAGE_COLLECTION)
|
|||
add_compile_definitions(SKIP_PATH_VALIDATION_FOR_COVERAGE_INSTRUMENTATION)
|
||||
endif()
|
||||
|
||||
# Kernel Undefined Behavior Sanitizer (KUBSAN)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
|
||||
if (ENABLE_KERNEL_UNDEFINED_SANITIZER)
|
||||
# Kernel Undefined Behavior Sanitizer (KUBSAN)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
|
||||
endif()
|
||||
|
||||
# Kernel Address Sanitize (KASAN) implementation is still a work in progress, this option
|
||||
# is not currently meant to be used, besides when developing Kernel ASAN support.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue