mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 05:32:44 +00:00 
			
		
		
		
	 4a5a1e8648
			
		
	
	
		4a5a1e8648
		
	
	
	
	
		
			
			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>
		
			
				
	
	
		
			12 lines
		
	
	
	
		
			295 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
	
		
			295 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
| set(SOURCES
 | |
|     UBSanitizer.cpp
 | |
|     ../LibC/ssp.cpp
 | |
| )
 | |
| 
 | |
| set_source_files_properties (../LibC/ssp.cpp PROPERTIES COMPILE_FLAGS
 | |
|     "-fno-stack-protector")
 | |
| 
 | |
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdlib")
 | |
| serenity_libc(LibUBSanitizer ubsan)
 | |
| 
 | |
| add_library(LibUBSanitizerStatic STATIC ${SOURCES})
 |