mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-05 15:09:31 +03:00
add MI_SECURE_FULL=ON as a cmake option to include double free mitigation
This commit is contained in:
parent
9b65388807
commit
56887aeb2f
1 changed files with 10 additions and 3 deletions
|
@ -10,6 +10,7 @@ option(MI_SEE_ASM "Generate assembly files" OFF)
|
||||||
option(MI_CHECK_FULL "Use full internal invariant checking in DEBUG mode" OFF)
|
option(MI_CHECK_FULL "Use full internal invariant checking in DEBUG mode" OFF)
|
||||||
option(MI_USE_CXX "Use the C++ compiler to compile the library" OFF)
|
option(MI_USE_CXX "Use the C++ compiler to compile the library" OFF)
|
||||||
option(MI_SECURE "Use security mitigations (like guard pages and randomization)" OFF)
|
option(MI_SECURE "Use security mitigations (like guard pages and randomization)" OFF)
|
||||||
|
option(MI_SECURE_FULL "Use full security mitigations, may be more expensive (includes double-free mitigation)" OFF)
|
||||||
option(MI_LOCAL_DYNAMIC_TLS "Use slightly slower, dlopen-compatible TLS mechanism (Unix)" OFF)
|
option(MI_LOCAL_DYNAMIC_TLS "Use slightly slower, dlopen-compatible TLS mechanism (Unix)" OFF)
|
||||||
option(MI_BUILD_TESTS "Build test executables" ON)
|
option(MI_BUILD_TESTS "Build test executables" ON)
|
||||||
|
|
||||||
|
@ -66,10 +67,16 @@ if(MI_OVERRIDE MATCHES "ON")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(MI_SECURE_FULL MATCHES "ON")
|
||||||
|
message(STATUS "Set full secure build (may be more expensive) (MI_SECURE_FULL=ON)")
|
||||||
|
list(APPEND mi_defines MI_SECURE=4)
|
||||||
|
set(MI_SECURE "ON")
|
||||||
|
else()
|
||||||
if(MI_SECURE MATCHES "ON")
|
if(MI_SECURE MATCHES "ON")
|
||||||
message(STATUS "Set secure build (MI_SECURE=ON)")
|
message(STATUS "Set secure build (MI_SECURE=ON)")
|
||||||
list(APPEND mi_defines MI_SECURE=3)
|
list(APPEND mi_defines MI_SECURE=3)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(MI_SEE_ASM MATCHES "ON")
|
if(MI_SEE_ASM MATCHES "ON")
|
||||||
message(STATUS "Generate assembly listings (MI_SEE_ASM=ON)")
|
message(STATUS "Generate assembly listings (MI_SEE_ASM=ON)")
|
||||||
|
|
Loading…
Add table
Reference in a new issue