From: Matthew Fernandez Date: Tue, 1 Feb 2022 07:24:56 +0000 (+1100) Subject: remove support for '-m' command-line option X-Git-Tag: 3.0.0~47^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=80e82fc8272fd9dcfa3c0a0a80e5d25f6180b18f;p=graphviz remove support for '-m' command-line option As described in the changelog entry, LSan and friends are a more effective way of performing this testing now. --- diff --git a/CHANGELOG.md b/CHANGELOG.md index a9ca5379b..f85c5c005 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/cmd/dot/dot.1 b/cmd/dot/dot.1 index a8617ea9a..8e00b7514 100644 --- a/cmd/dot/dot.1 +++ b/cmd/dot/dot.1 @@ -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. diff --git a/cmd/dot/dot.c b/cmd/dot/dot.c index ab3fc53ed..4c7804974 100644 --- a/cmd/dot/dot.c +++ b/cmd/dot/dot.c @@ -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 */