]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DEBUG: pool: show a few examples in -dMhelp
authorWilly Tarreau <w@1wt.eu>
Thu, 8 Dec 2022 17:42:51 +0000 (18:42 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 Dec 2022 17:45:41 +0000 (18:45 +0100)
It's not always easy to remember what certain options do together nor
which ones are only relevant when combined with others, so let's add a
few examples with the "help" command on -dM.

src/pool.c

index fd40cd87c0232febc8a5614fde7570fc636c7865..ba5fe5165278855f58efd73333ddedee78b7c380 100644 (file)
@@ -1052,6 +1052,17 @@ int pool_parse_debugging(const char *str, char **err)
                                          dbg_options[v].clr,
                                          dbg_options[v].hlp);
                        }
+
+                       memprintf(err,
+                                 "%s  -----------------+-----------------+-----------------------------------------\n"
+                                 "Examples:\n"
+                                 "  Disable merging and enable poisonning with byte 'P': -dM0x50,no-merge\n"
+                                 "  Randomly fail allocations: -dMfail\n"
+                                 "  Detect out-of-bound corruptions: -dMno-merge,tag\n"
+                                 "  Detect post-free cache corruptions: -dMno-merge,cold-first,integrity,caller\n"
+                                 "  Detect all cache corruptions: -dMno-merge,cold-first,integrity,tag,caller\n"
+                                 "  Detect post-free cache corruptions: -dMno-merge,cold-first,integrity,caller\n",
+                                 *err);
                        return -1;
                }