mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 04:27:45 +00:00
Userland: Port UBSAN implementation to userspace
Take Kernel/UBSanitizer.cpp and make a copy in LibSanitizer. We can use LibSanitizer to hold other sanitizers as people implement them :^). To enable UBSAN for LibC, DynamicLoader, and other low level system libraries, LibUBSanitizer is built as a serenity_libc, and has a static version for LibCStatic to use. The approach is the same as that taken in Note that this means now UBSAN is enabled for code generators, Lagom, Kernel, and Userspace with -DENABLE_UNDEFINED_SANTIZER=ON. In userspace however, UBSAN is not deadly (yet). Co-authored-by: ForLoveOfCats <ForLoveOfCats@vivaldi.net>
This commit is contained in:
parent
505f84daae
commit
4a5a1e8648
6 changed files with 259 additions and 2 deletions
|
@ -18,6 +18,10 @@ endif()
|
|||
|
||||
file(GLOB LIBSYSTEM_SOURCES "../Libraries/LibSystem/*.cpp")
|
||||
|
||||
if (ENABLE_UNDEFINED_SANITIZER)
|
||||
set(LOADER_SOURCES ${LOADER_SOURCES} ../Libraries/LibSanitizer/UBSanitizer.cpp)
|
||||
endif()
|
||||
|
||||
add_definitions(-D_DYNAMIC_LOADER)
|
||||
|
||||
set(SOURCES ${LOADER_SOURCES} ${AK_SOURCES} ${ELF_SOURCES} ${LIBC_SOURCES1} ${LIBC_SOURCES2} ${LIBC_SOURCES3} ${LIBSYSTEM_SOURCES})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue