Skip to content

Commit

Permalink
CMake: Hide KMALLOC_VERIFY_NO_SPINLOCK_HELD so folks don't find it
Browse files Browse the repository at this point in the history
Since I introduced this functionality there has been a steady stream of
people building with `ALL_THE_DEBUG_MACROS` and trying to boot the
system, and immediately hitting this assert. I have no idea why people
try to build with all the debugging enabled, but I'm tired of seeing the
bug reports about asserts we know are going to happen at this point.

So I'm hiding this value under the new ENABLE_ALL_DEBUG_FACILITIES flag
instead. This is only set by CI, and hopefully no-one will try to build
with this thing (It's documented as not recommended).

Fixes: SerenityOS#7527
  • Loading branch information
bgianfo authored and linusg committed May 31, 2021
1 parent d838a02 commit 26cb645
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ endif()
if (ENABLE_ALL_DEBUG_FACILITIES)
set(ENABLE_ALL_THE_DEBUG_MACROS ON)
set(ENABLE_EXTRA_KERNEL_DEBUG_SYMBOLS ON)

# Immediately finds violations during boot, shouldn't be discoverable
# by people who aren't working on fixing issues. Use this check to make
# sure this code continues to build instead of all_debug_macros to avoid
# people filing bugs.
set(KMALLOC_VERIFY_NO_SPINLOCK_HELD ON)
endif()

if (ENABLE_ALL_THE_DEBUG_MACROS)
Expand Down
3 changes: 2 additions & 1 deletion Meta/CMake/all_the_debug_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ set(PORTABLE_IMAGE_LOADER_DEBUG ON)
set(SYNTAX_HIGHLIGHTING_DEBUG ON)
set(KEYBOARD_SHORTCUTS_DEBUG ON)
set(KMALLOC_DEBUG ON)
set(KMALLOC_VERIFY_NO_SPINLOCK_HELD ON)
set(MARKDOWN_DEBUG ON)
set(REGEX_DEBUG ON)
set(TLS_DEBUG ON)
Expand Down Expand Up @@ -208,3 +207,5 @@ set(WEBSERVER_DEBUG ON)
# set(DEFINE_DEBUG_REGISTER ON)
# Clogs up build: The WrapperGenerator stuff is run at compile time.
# set(WRAPPER_GENERATOR_DEBUG ON)
# Immediately finds violations during boot, shouldn't be discoverable by people who aren't working on fixing.
# set(KMALLOC_VERIFY_NO_SPINLOCK_HELD ON)

0 comments on commit 26cb645

Please sign in to comment.