]> granicus.if.org Git - graphviz/commitdiff
remove support for '-m' command-line option
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 1 Feb 2022 07:24:56 +0000 (18:24 +1100)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 2 Feb 2022 11:55:10 +0000 (22:55 +1100)
As described in the changelog entry, LSan and friends are a more effective way
of performing this testing now.

CHANGELOG.md
cmd/dot/dot.1
cmd/dot/dot.c

index a9ca5379b8ca87cdcfeb361364aadbca95d316d9..f85c5c005f7ddb50fe0a3eb1329298789d01d044 100644 (file)
@@ -68,6 +68,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - **Breaking**: Graphviz headers no longer (re-)define the C constants `INT_MIN`
   and `INT_MAX`. Replacements can be found in the C standard library’s limits.h.
 - **Breaking**: Graphviz headers no longer define the constant `_DUMMY_ELEM`.
+- **Breaking**: The `-m` memory test option to Graphviz command-line programs
+  has been deprecated. Tools such as
+  [Leak Sanitizer](https://clang.llvm.org/docs/LeakSanitizer.html) are a more
+  effective modern way of diagnosing memory safety issues.
 - The Ming plugin that produced Shockwave files has been removed. This format
   was EOLed by Adobe in April 2019. #2160
 - CentOS 7 packages now include libmingle and the `mingle` program.
index a8617ea9a80589bfff80b4fc4a9c4d942a5c24ab..8e00b75141c1ce413dd0f639c78272d8054ef16a 100644 (file)
@@ -627,8 +627,6 @@ As usual, edge layout is guided by the \fBsplines\fR attribute.
 .PP
 \fB\-c\fP configure plugins.
 .PP
-\fB\-m\fP memory test (observe no growth with top, kill when done).
-.PP
 \fB\-q\fIlevel\fR set level of message suppression. The default is 1.
 .PP
 \fB\-s\fIfscale\fR scale input by \fIfscale\fP, the default is 72.
index ab3fc53edfbc49b080c9206e9ab44dc70243e626..4c7804974545d14ce60e95ad2707694024a0a4ed 100644 (file)
@@ -54,40 +54,6 @@ static void fperr(int s)
 #endif
 #endif
 
-static graph_t *create_test_graph(void)
-{
-#define NUMNODES 5
-
-    Agnode_t *node[NUMNODES];
-    Agedge_t *e;
-    Agraph_t *g;
-    Agraph_t *sg;
-    int j, k;
-    char name[10];
-
-    /* Create a new graph */
-    g = agopen("new_graph", Agdirected,NULL);
-
-    /* Add nodes */
-    for (j = 0; j < NUMNODES; j++) {
-       snprintf(name, sizeof(name), "%d", j);
-       node[j] = agnode(g, name, 1);
-       agbindrec(node[j], "Agnodeinfo_t", sizeof(Agnodeinfo_t), true); //node custom data
-    }
-
-    /* Connect nodes */
-    for (j = 0; j < NUMNODES; j++) {
-       for (k = j + 1; k < NUMNODES; k++) {
-           e = agedge(g, node[j], node[k], NULL, 1);
-           agbindrec(e, "Agedgeinfo_t", sizeof(Agedgeinfo_t), true);   //edge custom data
-       }
-    }
-    sg = agsubg (g, "cluster1", 1);
-    agsubnode (sg, node[0], 1);
-
-    return g;
-}
-
 int main(int argc, char **argv)
 {
     graph_t *prev = NULL;
@@ -105,15 +71,8 @@ int main(int argc, char **argv)
 #endif
 
     if (MemTest) {
-       while (MemTest--) {
-           /* Create a test graph */
-           G = create_test_graph();
-
-           /* Perform layout and cleanup */
-           gvLayoutJobs(Gvc, G);  /* take layout engine from command line */
-           gvFreeLayout(Gvc, G);
-           agclose (G);
-       }
+        // TODO: fully remove `MemTest` and associated `-m` parsing in future
+        fprintf(stderr, "The -m command-line option is no longer supported.\n");
     }
     else if ((G = gvPluginsGraph(Gvc))) {
            gvLayoutJobs(Gvc, G);  /* take layout engine from command line */