]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: debug: make DEBUG_STRICT=1 the default
authorWilly Tarreau <w@1wt.eu>
Wed, 10 Apr 2024 07:02:28 +0000 (09:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Apr 2024 15:25:45 +0000 (17:25 +0200)
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.

INSTALL
Makefile
include/haproxy/defaults.h

diff --git a/INSTALL b/INSTALL
index 1268f235100b0bca348b8fb4ff6728dd4ab451b5..56e45963111eebd44ee38ccdabd4c717ebbf8fe8 100644 (file)
--- 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.
 
index 76b6cfa6b2e12cd8c1a3afc791e2691c3909b065..888b3d7a3da4b90a0a868f9ffefb9cc0f2d10687 100644 (file)
--- 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
index bcb63e6cd0d462904db642817ef40523c99754ac..c0cb9f34b5dcfaf19611bd5f60c20d837d7352d5 100644 (file)
 # 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 */