From: Willy Tarreau Date: Wed, 10 Apr 2024 07:02:28 +0000 (+0200) Subject: BUILD: debug: make DEBUG_STRICT=1 the default X-Git-Tag: v3.0-dev8~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b70981532a517cf5845bf1e96a8eaefaa0e1a2eb;p=thirdparty%2Fhaproxy.git BUILD: debug: make DEBUG_STRICT=1 the default We continue to carry it in the makefile, which adds to the difficulty of passing new options. Let's make DEBUG_STRICT=1 the default so that one has to explicitly pass DEBUG_STRICT=0 to disable it. This allows us to remove the option from the default DEBUG variable in the makefile. --- diff --git a/INSTALL b/INSTALL index 1268f23510..56e4596311 100644 --- a/INSTALL +++ b/INSTALL @@ -658,8 +658,8 @@ these options should not be changed. Among the usable ones are: conditions are not met, and whose violation will result in a misbehaving process due to memory corruption or other significant trouble, possibly caused by an attempt to exploit a bug in the program or a library it relies - on. The option knows 3 values: 0 (disable all such assertions, the default - when the option is not set), 1 (enable all inexpensive assertions), and + on. The option knows 3 values: 0 (disable all such assertions, not + recommended), 1 (enable all inexpensive assertions, the default), and 2 (enable all assertions even in fast paths). Setting the option with no value corresponds to 1, which is the recommended value for production. diff --git a/Makefile b/Makefile index 76b6cfa6b2..888b3d7a3d 100644 --- a/Makefile +++ b/Makefile @@ -228,7 +228,7 @@ SMALL_OPTS = # DEBUG_NO_POOLS, DEBUG_FAIL_ALLOC, DEBUG_STRICT_ACTION=[0-3], DEBUG_HPACK, # DEBUG_AUTH, DEBUG_SPOE, DEBUG_UAF, DEBUG_THREAD, DEBUG_STRICT, DEBUG_DEV, # DEBUG_TASK, DEBUG_MEMORY_POOLS, DEBUG_POOL_TRACING, DEBUG_QPACK, DEBUG_LIST. -DEBUG = -DDEBUG_STRICT -DDEBUG_MEMORY_POOLS +DEBUG = -DDEBUG_MEMORY_POOLS #### Trace options # Use TRACE=1 to trace function calls to file "trace.out" or to stderr if not diff --git a/include/haproxy/defaults.h b/include/haproxy/defaults.h index bcb63e6cd0..c0cb9f34b5 100644 --- a/include/haproxy/defaults.h +++ b/include/haproxy/defaults.h @@ -556,4 +556,9 @@ # define RING_DFLT_QUEUES 6 #endif +/* Let's make DEBUG_STRICT default to 1 to get rid of it in the makefile */ +#ifndef DEBUG_STRICT +# define DEBUG_STRICT 1 +#endif + #endif /* _HAPROXY_DEFAULTS_H */