mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
src: add curl_global_init_mem testing
Build with "configure --enable-init-mem-debug" to make the tool use curl_global_init_mem() and a set of private memory funtion callbacks for libcurl's memory management. Using this setup, memory mixups in tool code is more likely to cause crashes and thus get discovered while running tests. This curl_global_init_mem debug mode can only be done when building libcurl shared (not static) and without debugging enabled - since it needs to use the custom memory funtion callbacks. Closes #21099
This commit is contained in:
parent
6041b9b11b
commit
59c11074cf
3 changed files with 114 additions and 0 deletions
|
|
@ -510,7 +510,13 @@ option(CURL_DISABLE_TYPECHECK "Disable curl_easy_setopt()/curl_easy_getinfo() ty
|
|||
mark_as_advanced(CURL_DISABLE_TYPECHECK)
|
||||
option(CURL_DISABLE_VERBOSE_STRINGS "Disable verbose strings" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_VERBOSE_STRINGS)
|
||||
option(CURL_DEBUG_GLOBAL_MEM "Debug curl_global_init_mem" OFF)
|
||||
mark_as_advanced(CURL_DEBUG_GLOBAL_MEM)
|
||||
|
||||
if(CURL_DEBUG_GLOBAL_MEM)
|
||||
# Set it via the command-line to make it apply to the entire directory.
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "CURL_DEBUG_GLOBAL_MEM")
|
||||
endif()
|
||||
if(CURL_DISABLE_TYPECHECK)
|
||||
# Set it via the command-line to make it apply to examples also.
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "CURL_DISABLE_TYPECHECK")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue