Add address sanitizer support for debugging double free
This commit is contained in:
@@ -138,6 +138,7 @@ option(GDBSTUB "Enable GDB stub server for debugging"
|
||||
option(DEV_BRANCH "Development branch" OFF)
|
||||
option(DISCORD "Discord Rich Presence support" ON)
|
||||
option(DEBUGREGS486 "Enable debug register opeartion on 486+ CPUs" OFF)
|
||||
option(LIBASAN "Enable compilation with the addresss sanitizer" OFF)
|
||||
|
||||
if(WIN32)
|
||||
set(QT ON)
|
||||
@@ -212,4 +213,10 @@ if(NOT EMU_COPYRIGHT_YEAR)
|
||||
set(EMU_COPYRIGHT_YEAR 2024)
|
||||
endif()
|
||||
|
||||
# Libasan
|
||||
if(LIBASAN)
|
||||
add_compile_options(-fsanitize=address)
|
||||
add_link_options(-fsanitize=address)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
Reference in New Issue
Block a user