]>
granicus.if.org Git - graphviz/log
Magnus Jacobsson [Mon, 14 Sep 2020 13:18:42 +0000 (15:18 +0200)]
Fix lib/common objs not included in lib/gvc lib for CMake builds
This is what the autotools builds do.
For some reason this was not a problem on Windows.
Without this, the rtest/test_examples.py gave errors like this for e.g. demo.c:
demo.c:(.text+0x29): undefined reference to `gvParseArgs'
Magnus Jacobsson [Tue, 15 Sep 2020 11:58:55 +0000 (13:58 +0200)]
Correct link library order for mm2gv
The sparse lib depends on many of the libs that were listed before it.
An upcoming change to lib/gvc revealed this and without this change,
the following link error would occur:
../../lib/sparse/libsparse.a(SparseMatrix.c.o): In function `SparseMatrix_page_rank':
SparseMatrix.c:(.text+0x12471): undefined reference to `Verbose'
Magnus Jacobsson [Fri, 18 Sep 2020 09:11:44 +0000 (11:11 +0200)]
Fix math library not linked with lib/sparse and remove from gvpack
The gvpack tool only uses math functions indirectly through other
libraries including plugin/neato_layout which use lib/sparse.
Magnus Jacobsson [Mon, 14 Sep 2020 14:14:32 +0000 (16:14 +0200)]
Remove obsolete Linux special add of math target link library
Since the previous commit, this is no longer necessary for programs
that only use math functions indirectly through lib/gvc.
Magnus Jacobsson [Mon, 14 Sep 2020 13:12:49 +0000 (15:12 +0200)]
Fix math library not linked with lib/gvc for Linux CMake builds
This is what the autotools builds do.
$(MATH_LIB) was already referenced by lib/gvc/CmakeLists.txt, but it
was never given any value.
For Windows, this is not necessary since math functions are included
in the Universal C Runtime library (UCRT).
Without this, the rtest/test_examples.py gave errors like this for e.g. demo.c:
/usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib/libgvc.so: undefined reference to `atan2'
Magnus Jacobsson [Fri, 18 Sep 2020 09:55:17 +0000 (11:55 +0200)]
Archive Linux CMake builds under Packages/experimental to avoid deployment
Changes COLLECTION to experimental for Linux CMake builds which causes
the artifacts to be archived under Packages/experimental which is not
deployed to https://www2.graphviz.org/Packages.
Magnus Jacobsson [Sun, 13 Sep 2020 18:35:13 +0000 (20:35 +0200)]
Add generation of a Debian package from Ubuntu CMake build
Also adapts jobs & scripts.
This does not yet replicate the structure of Debian packages produced
by autotools. Everything is put into one single package named
Graphviz-<version>-Linux.deb.
Matthew Fernandez [Tue, 22 Sep 2020 15:13:15 +0000 (15:13 +0000)]
Merge branch '1785-3' into 'master'
disambiguate #includes (3/5)
See merge request graphviz/graphviz!1582
Matthew Fernandez [Tue, 22 Sep 2020 15:01:38 +0000 (15:01 +0000)]
Merge branch '
afabefdf -dab2-43e5-bacd-
ece9214998cd ' into 'master'
remove ad hoc name mangling in the gml parser
Closes #1806
See merge request graphviz/graphviz!1580
Matthew Fernandez [Sat, 29 Aug 2020 23:19:41 +0000 (16:19 -0700)]
disambiguate plugin/xlib #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 23:13:29 +0000 (16:13 -0700)]
remove unnecessary plugin/xlib include path
Matthew Fernandez [Sat, 29 Aug 2020 22:53:29 +0000 (15:53 -0700)]
disambiguate plugin/webp #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 22:47:07 +0000 (15:47 -0700)]
remove unnecessary plugin/webp include path
Matthew Fernandez [Sat, 29 Aug 2020 22:24:13 +0000 (15:24 -0700)]
disambiguate plugin/visio #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 22:10:06 +0000 (15:10 -0700)]
remove unnecessary plugin/visio include path
Matthew Fernandez [Sat, 29 Aug 2020 21:44:59 +0000 (14:44 -0700)]
disambiguate plugin/rsvg #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 21:37:56 +0000 (14:37 -0700)]
remove unnecessary plugin/rsvg include path
Matthew Fernandez [Sat, 29 Aug 2020 20:13:22 +0000 (13:13 -0700)]
disambiguate plugin/quartz #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 20:04:27 +0000 (13:04 -0700)]
remove unnecessary plugin/quartz include path
Matthew Fernandez [Sat, 29 Aug 2020 19:43:25 +0000 (12:43 -0700)]
disambiguate plugin/poppler #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 19:37:01 +0000 (12:37 -0700)]
remove unnecessary plugin/poppler include path
Matthew Fernandez [Sat, 29 Aug 2020 19:16:12 +0000 (12:16 -0700)]
disambiguate plugin/pango #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 19:05:13 +0000 (12:05 -0700)]
remove unnecessary plugin/pango include path
Matthew Fernandez [Sat, 29 Aug 2020 18:44:03 +0000 (11:44 -0700)]
disambiguate plugin/neato_layout #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 18:35:36 +0000 (11:35 -0700)]
remove unnecessary plugin/neato_layout include path
Matthew Fernandez [Sat, 29 Aug 2020 18:14:12 +0000 (11:14 -0700)]
disambiguate plugin/ming #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 18:05:20 +0000 (11:05 -0700)]
remove unnecessary plugin/ming include path
Matthew Fernandez [Sat, 29 Aug 2020 04:51:46 +0000 (21:51 -0700)]
disambiguate plugin/lasi #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 04:42:21 +0000 (21:42 -0700)]
remove unnecessary plugin/lasi include path
Matthew Fernandez [Sat, 29 Aug 2020 04:21:10 +0000 (21:21 -0700)]
disambiguate plugin/gtk #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 04:13:32 +0000 (21:13 -0700)]
remove unnecessary plugin/gtk include path
Matthew Fernandez [Sat, 29 Aug 2020 03:18:58 +0000 (20:18 -0700)]
disambiguate plugin/gs #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 03:11:25 +0000 (20:11 -0700)]
remove unnecessary plugin/gd include path
Matthew Fernandez [Sat, 29 Aug 2020 02:51:10 +0000 (19:51 -0700)]
disambiguate plugin/glitz #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 02:38:07 +0000 (19:38 -0700)]
remove unnecessary plugin/glitz include path
Matthew Fernandez [Sat, 29 Aug 2020 01:54:19 +0000 (18:54 -0700)]
disambiguate plugin/gdk #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 01:44:57 +0000 (18:44 -0700)]
remove unnecessary plugin/gdk include path
Matthew Fernandez [Sat, 29 Aug 2020 01:01:27 +0000 (18:01 -0700)]
disambiguate plugin/gdiplus #includes
Related to #1785.
Matthew Fernandez [Sat, 29 Aug 2020 00:44:23 +0000 (17:44 -0700)]
remove unnecessary plugin/gdiplus include path
Matthew Fernandez [Wed, 26 Aug 2020 02:59:18 +0000 (19:59 -0700)]
disambiguate plugin/gd #includes
Related to #1242 and #1785.
Matthew Fernandez [Wed, 26 Aug 2020 02:42:27 +0000 (19:42 -0700)]
remove unnecessary plugin/gd include path
Matthew Fernandez [Wed, 26 Aug 2020 01:53:34 +0000 (18:53 -0700)]
disambiguate plugin/dot_layout #includes
Related to #1785.
Matthew Fernandez [Wed, 26 Aug 2020 01:46:16 +0000 (18:46 -0700)]
remove unnecessary plugin/dot_layout include path
Matthew Fernandez [Wed, 26 Aug 2020 01:36:25 +0000 (18:36 -0700)]
disambiguate plugin/devil #includes
Related to #1785.
Matthew Fernandez [Wed, 26 Aug 2020 01:24:19 +0000 (18:24 -0700)]
remove unnecessary plugin/devil include path
Matthew Fernandez [Tue, 25 Aug 2020 00:48:30 +0000 (17:48 -0700)]
disambiguate plugin/core #includes
Related to #1242 and #1785.
Matthew Fernandez [Tue, 25 Aug 2020 00:25:18 +0000 (17:25 -0700)]
remove unnecessary plugin/core include path
Matthew Fernandez [Wed, 16 Sep 2020 02:17:13 +0000 (19:17 -0700)]
remove unnecessary intermediate files when generating gml parser
Closes #1806.
Matthew Fernandez [Wed, 16 Sep 2020 02:01:32 +0000 (19:01 -0700)]
remove now-unnecessary ad hoc replacement of gml parser prefix
Related to #1806.
Matthew Fernandez [Wed, 16 Sep 2020 01:47:30 +0000 (18:47 -0700)]
use api.prefix to set gml parser's prefix
Related to #1806.
Matthew Fernandez [Wed, 16 Sep 2020 01:28:06 +0000 (18:28 -0700)]
explicitly set the output of the gml parser rule
This has no effect for now, but will once we set an api.prefix. Related to
#1806.
Matthew Fernandez [Wed, 16 Sep 2020 01:24:23 +0000 (18:24 -0700)]
drop compatibility with Yacc, Bison < 3 in gml parser
Other parsers in the tree, e.g. lib/cgraph/grammar.y, already require Bison 3+,
so this does not change build requirements. Related to #1806.
Matthew Fernandez [Wed, 16 Sep 2020 01:22:32 +0000 (18:22 -0700)]
suppress Bison warnings from using non-Yacc compatible extensions in gml parser
Related to #1806.
Matthew Fernandez [Wed, 16 Sep 2020 00:25:26 +0000 (17:25 -0700)]
replace ad hoc name mangling in gml scanner with Flex's option prefix
This drops compatibility with Lex, but other scanners in the tree, e.g.
lib/cgraph/scan.l already require Flex, so this does not change build
requirements. Related to #1806.
Matthew Fernandez [Wed, 16 Sep 2020 01:13:40 +0000 (18:13 -0700)]
remove legacy CMake replacement script
This should have been removed in
5e78a26f6820b8bf85038f269583ee879022fa3e .
Related to #1806.
Matthew Fernandez [Tue, 22 Sep 2020 00:03:32 +0000 (00:03 +0000)]
Merge branch 'fix_ps2pdf' into 'master'
Fix failure to create .pdf files with autotools
Closes #1763
See merge request graphviz/graphviz!1577
Pierre Labastie [Tue, 15 Sep 2020 08:42:18 +0000 (10:42 +0200)]
Do not fail if ps2pdf is present and the .pdf files exist
If ps2pdf is not present on the system, the build
fails even if the .pdf files exist. The reason is that the .ps
files are created on the fly, and they are more recent than the
distributed .pdf. Makefile then runs "false <something>", which
obviously fails.
Setting PS2PDF to "true" is not a solution because we do not
want to ignore when the .pdf files are really absent.
This patch makes running $(PS2PDF) conditional, but still
imposes the .pdf files to be generated when running "make dist".
Matthew Fernandez [Sun, 20 Sep 2020 22:53:39 +0000 (22:53 +0000)]
Merge branch '
a51bdabc -bd7b-4dd0-8515-
8970f03c1432 ' into 'master'
implement string mapping of expr parser's token table using Bison feature
See merge request graphviz/graphviz!1576
Matthew Fernandez [Mon, 14 Sep 2020 03:02:48 +0000 (20:02 -0700)]
implement string mapping of expr parser's token table using Bison feature
This removes some juggling to construct a string table of the tokens in the
expr parser, to replace it with native Bison functionality. Loosely related to
#1806.
Matthew Fernandez [Sat, 19 Sep 2020 17:00:55 +0000 (17:00 +0000)]
Merge branch '
5dfecf35 -b8fc-4094-be39-
b6b81dab61bd ' into 'master'
fix some Coverity warnings
See merge request graphviz/graphviz!1574
Matthew Fernandez [Sun, 13 Sep 2020 03:51:17 +0000 (20:51 -0700)]
remove undefined behavior in VPSC Constraint output
The address of a reference parameter can never be NULL. A reference parameter
is, definitionally, non-NULL. So taking the address of a reference parameter and
comparing it against NULL is always false. None of the call sites of this
operator passed in NULL, so this change is a no-op from a user perspective, but
it guards against future misuse.
This addresses the following Coverity warning:
Error: COMPILER_WARNING: [#def230]
graphviz-2.40.1/lib/vpsc/constraint.cpp: scope_hint: In function 'std::ostream& operator<<(std::ostream&, const Constraint&)'
graphviz-2.40.1/lib/vpsc/constraint.cpp:46:7: warning: the compiler can assume that the address of 'c' will never be NULL [-Waddress]
# if(&c==NULL) {
# ^
# 44| std::ostream& operator <<(std::ostream &os, const Constraint &c)
# 45| {
# 46|-> if(&c==NULL) {
# 47| os<<"NULL";
# 48| } else {
Related to #1464.
Matthew Fernandez [Sun, 13 Sep 2020 03:24:54 +0000 (20:24 -0700)]
fix resource leakage in unflatten
This addresses the following Coverity warning:
Error: RESOURCE_LEAK (CWE-772): [#def70]
graphviz-2.40.1/cmd/tools/unflatten.c:195: alloc_fn: Storage is returned from allocation function "openFile".
graphviz-2.40.1/cmd/tools/unflatten.c:160:5: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/tools/unflatten.c:160:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
graphviz-2.40.1/cmd/tools/unflatten.c:170:5: return_alloc: Returning allocated memory "fp".
graphviz-2.40.1/cmd/tools/unflatten.c:195: var_assign: Assigning: "outFile" = storage returned from "openFile(optarg, "w")".
graphviz-2.40.1/cmd/tools/unflatten.c:195: overwrite_var: Overwriting "outFile" in "outFile = openFile(optarg, "w")" leaks the storage that "outFile" points to.
# 193| break;
# 194| case 'o':
# 195|-> outFile = openFile(optarg, "w");
# 196| break;
# 197| case '?':
Related to #1464.
Matthew Fernandez [Sun, 13 Sep 2020 03:23:07 +0000 (20:23 -0700)]
fix rersource leakage in sccmap
This addresses the following Coverity warning:
Error: RESOURCE_LEAK (CWE-772): [#def69]
graphviz-2.40.1/cmd/tools/sccmap.c:356: alloc_fn: Storage is returned from allocation function "openFile".
graphviz-2.40.1/cmd/tools/sccmap.c:313:5: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/tools/sccmap.c:313:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
graphviz-2.40.1/cmd/tools/sccmap.c:323:5: return_alloc: Returning allocated memory "fp".
graphviz-2.40.1/cmd/tools/sccmap.c:356: var_assign: Assigning: "outfp" = storage returned from "openFile(optarg, "w")".
graphviz-2.40.1/cmd/tools/sccmap.c:356: overwrite_var: Overwriting "outfp" in "outfp = openFile(optarg, "w")" leaks the storage that "outfp" points to.
Related to #1464.
Matthew Fernandez [Sun, 13 Sep 2020 03:20:53 +0000 (20:20 -0700)]
fix resource leakage in gvpack
This addresses the following Coverity warning:
Error: RESOURCE_LEAK (CWE-772): [#def60]
graphviz-2.40.1/cmd/tools/gvpack.c:239: alloc_fn: Storage is returned from allocation function "openFile".
graphviz-2.40.1/cmd/tools/gvpack.c:124:5: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/tools/gvpack.c:124:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
graphviz-2.40.1/cmd/tools/gvpack.c:134:5: return_alloc: Returning allocated memory "fp".
graphviz-2.40.1/cmd/tools/gvpack.c:239: var_assign: Assigning: "outfp" = storage returned from "openFile(optarg, "w")".
graphviz-2.40.1/cmd/tools/gvpack.c:239: overwrite_var: Overwriting "outfp" in "outfp = openFile(optarg, "w")" leaks the storage that "outfp" points to.
# 237| break;
# 238| case 'o':
# 239|-> outfp = openFile(optarg, "w");
# 240| break;
# 241| case 'u':
Related to #1464.
Matthew Fernandez [Sun, 13 Sep 2020 03:17:36 +0000 (20:17 -0700)]
fix resource leakage in gv2gml
This addresses the following Coverity warning:
Error: RESOURCE_LEAK (CWE-772): [#def57]
graphviz-2.40.1/cmd/tools/gv2gml.c:713: alloc_fn: Storage is returned from allocation function "openFile".
graphviz-2.40.1/cmd/tools/gv2gml.c:666:5: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/tools/gv2gml.c:666:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
graphviz-2.40.1/cmd/tools/gv2gml.c:677:5: return_alloc: Returning allocated memory "fp".
graphviz-2.40.1/cmd/tools/gv2gml.c:713: var_assign: Assigning: "outFile" = storage returned from "openFile(optarg, "w")".
graphviz-2.40.1/cmd/tools/gv2gml.c:713: overwrite_var: Overwriting "outFile" in "outFile = openFile(optarg, "w")" leaks the storage that "outFile" points to.
# 711| switch (c) {
# 712| case 'o':
# 713|-> outFile = openFile(optarg, "w");
# 714| break;
# 715| case ':':
Related to #1464.
Matthew Fernandez [Sun, 13 Sep 2020 03:15:51 +0000 (20:15 -0700)]
fix resource leakage in graphml2gv
This addresses the following Coverity warning:
Error: RESOURCE_LEAK (CWE-772): [#def56]
graphviz-2.40.1/cmd/tools/graphml2gv.c:729: alloc_fn: Storage is returned from allocation function "openFile".
graphviz-2.40.1/cmd/tools/graphml2gv.c:676:5: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/tools/graphml2gv.c:676:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
graphviz-2.40.1/cmd/tools/graphml2gv.c:687:5: return_alloc: Returning allocated memory "fp".
graphviz-2.40.1/cmd/tools/graphml2gv.c:729: var_assign: Assigning: "outFile" = storage returned from "openFile(optarg, "w")".
graphviz-2.40.1/cmd/tools/graphml2gv.c:729: overwrite_var: Overwriting "outFile" in "outFile = openFile(optarg, "w")" leaks the storage that "outFile" points to.
# 727| break;
# 728| case 'o':
# 729|-> outFile = openFile(optarg, "w");
# 730| break;
# 731| case ':':
Related to #1464.
Matthew Fernandez [Sun, 13 Sep 2020 03:13:23 +0000 (20:13 -0700)]
fix resource leakage in gml2gv
This addresses the following Coverity warning:
Error: RESOURCE_LEAK (CWE-772): [#def51]
graphviz-2.40.1/cmd/tools/gml2gv.c:123: alloc_fn: Storage is returned from allocation function "openFile".
graphviz-2.40.1/cmd/tools/gml2gv.c:68:5: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/tools/gml2gv.c:68:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
graphviz-2.40.1/cmd/tools/gml2gv.c:79:5: return_alloc: Returning allocated memory "fp".
graphviz-2.40.1/cmd/tools/gml2gv.c:123: var_assign: Assigning: "outFile" = storage returned from "openFile(optarg, "w")".
graphviz-2.40.1/cmd/tools/gml2gv.c:123: overwrite_var: Overwriting "outFile" in "outFile = openFile(optarg, "w")" leaks the storage that "outFile" points to.
# 121| break;
# 122| case 'o':
# 123|-> outFile = openFile(optarg, "w");
# 124| break;
# 125| case ':':
Related to #1464.
Matthew Fernandez [Sun, 13 Sep 2020 03:11:15 +0000 (20:11 -0700)]
fix resource leakage in cvtgxl
This addresses the following Coverity warning:
Error: RESOURCE_LEAK (CWE-772): [#def50]
graphviz-2.40.1/cmd/tools/cvtgxl.c:153: alloc_fn: Storage is returned from allocation function "openFile".
graphviz-2.40.1/cmd/tools/cvtgxl.c:65:5: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/tools/cvtgxl.c:65:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
graphviz-2.40.1/cmd/tools/cvtgxl.c:76:5: return_alloc: Returning allocated memory "fp".
graphviz-2.40.1/cmd/tools/cvtgxl.c:153: var_assign: Assigning: "outFile" = storage returned from "openFile(optarg, "w")".
graphviz-2.40.1/cmd/tools/cvtgxl.c:153: overwrite_var: Overwriting "outFile" in "outFile = openFile(optarg, "w")" leaks the storage that "outFile" points to.
# 151| break;
# 152| case 'o':
# 153|-> outFile = openFile(optarg, "w");
# 154| break;
# 155| case ':':
Related to #1464.
Matthew Fernandez [Sun, 13 Sep 2020 03:08:30 +0000 (20:08 -0700)]
fix resource leakage in acyclic
This addresses the following Coverity warning:
Error: RESOURCE_LEAK (CWE-772): [#def47]
graphviz-2.40.1/cmd/tools/acyclic.c:151: alloc_fn: Storage is returned from allocation function "openFile".
graphviz-2.40.1/cmd/tools/acyclic.c:129:5: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/tools/acyclic.c:129:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
graphviz-2.40.1/cmd/tools/acyclic.c:139:5: return_alloc: Returning allocated memory "fp".
graphviz-2.40.1/cmd/tools/acyclic.c:151: var_assign: Assigning: "outFile" = storage returned from "openFile(optarg, "w")".
graphviz-2.40.1/cmd/tools/acyclic.c:151: overwrite_var: Overwriting "outFile" in "outFile = openFile(optarg, "w")" leaks the storage that "outFile" points to.
# 149| switch (c) {
# 150| case 'o':
# 151|-> outFile = openFile(optarg, "w");
# 152| break;
# 153| case 'n':
Related to #1464.
Matthew Fernandez [Sun, 13 Sep 2020 02:14:50 +0000 (19:14 -0700)]
fix file handle leakage
This addresses the following Coverity warnings:
Error: RESOURCE_LEAK (CWE-772): [#def30]
graphviz-2.40.1/cmd/lefty/lefty.c:469: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/lefty/lefty.c:469: var_assign: Assigning: "fp" = storage returned from "fopen(argv[0], "r")".
graphviz-2.40.1/cmd/lefty/lefty.c:464: overwrite_var: Overwriting "fp" in "fp = stdin" leaks the storage that "fp" points to.
# 462| usage(0);
# 463| else if (strcmp (argv[0], "-") == 0)
# 464|-> fp = stdin;
# 465| else if (argv[0][0] == '-') {
# 466| fprintf (stderr, "option %s unrecognized - ignored\n", argv[0]);
Error: RESOURCE_LEAK (CWE-772): [#def31]
graphviz-2.40.1/cmd/lefty/lefty.c:469: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/lefty/lefty.c:469: var_assign: Assigning: "fp" = storage returned from "fopen(argv[0], "r")".
graphviz-2.40.1/cmd/lefty/lefty.c:469: overwrite_var: Overwriting "fp" in "fp = fopen(argv[0], "r")" leaks the storage that "fp" points to.
# 467| }
# 468| else {
# 469|-> if ((fp = fopen (argv[0], "r")) == NULL) {
# 470| fprintf (stderr, "cannot open input file: %s\n", argv[0]);
# 471| exit(2);
Related to #1464.
Matthew Fernandez [Sun, 13 Sep 2020 01:34:55 +0000 (18:34 -0700)]
fix resource leak in country_graph_coloring_internal
This addresses the following Coverity warnings:
Error: CPPCHECK_WARNING (CWE-404): [#def16]
graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:275: error[resourceLeak]: Resource leak: fp
# 273| }
# 274| }
# 275|-> }
# 276|
# 277| void country_graph_coloring_internal(int seed, SparseMatrix A, int **p, real *norm_1, int do_swapping){
Error: RESOURCE_LEAK (CWE-772): [#def17]
graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:237: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:237: var_assign: Assigning: "fp" = storage returned from "fopen("timing_greedy", "w")".
graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:272: noescape: Resource "fp" is not freed or pointed-to in "fprintf". [Note: The source code implementation of the function has been overridden by a builtin model.]
graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:275: leaked_storage: Variable "fp" going out of scope leaks the storage it points to.
# 273| }
# 274| }
# 275|-> }
# 276|
# 277| void country_graph_coloring_internal(int seed, SparseMatrix A, int **p, real *norm_1, int do_swapping){
Related to #1464.
Matthew Fernandez [Sun, 13 Sep 2020 01:32:36 +0000 (18:32 -0700)]
fix resource leak in edgepaint
This addresses the following Coverity warning:
Error: RESOURCE_LEAK (CWE-772): [#def15]
graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:190: alloc_fn: Storage is returned from allocation function "openFile".
graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:59:2: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:59:2: var_assign: Assigning: "fp" = "fopen(name, mode)".
graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:69:2: return_alloc: Returning allocated memory "fp".
graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:190: var_assign: Assigning: "outfile" = storage returned from "openFile(optarg, "w", CmdName)".
graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:190: overwrite_var: Overwriting "outfile" in "outfile = openFile(optarg, "w", CmdName)" leaks the storage that "outfile" points to.
# 188| break;
# 189| case 'o':
# 190|-> outfile = openFile(optarg, "w", CmdName);
# 191| break;
# 192| default:
Related to #1464.
Magnus Jacobsson [Sat, 19 Sep 2020 12:55:23 +0000 (12:55 +0000)]
Merge branch 'replace-rtest.sh-with-rtest.py-for-remaining-automake-targets' into 'master'
Replace rtest.sh with rtest.py for remaining automake targets
See merge request graphviz/graphviz!1579
Matthew Fernandez [Sat, 19 Sep 2020 03:17:11 +0000 (03:17 +0000)]
Merge branch '
0dbb043b -0565-4f23-9519-
265abd027a1d ' into 'master'
fix: track source line number accurately across newlines in quoted strings
Closes #1411
See merge request graphviz/graphviz!1573
Matthew Fernandez [Sun, 13 Sep 2020 00:54:43 +0000 (17:54 -0700)]
fix: track source line number accurately across newlines in quoted strings
The regex for matching arbitrary content within a quoted string (qstring) was
too broad, matching also newlines. Due to the way Flex preferences regex matches
this prevented the literal newline rule from matching at all within a quoted
string. As a result error messages would reference incorrect line numbers.
Closes #1411.
Matthew Fernandez [Sat, 19 Sep 2020 00:55:37 +0000 (00:55 +0000)]
Merge branch '
257ce4d0 -80d4-4b53-8df9-
25677f79cf65 ' into 'master'
remove compile time configuration via iffe
Closes #1521 and #1422
See merge request graphviz/graphviz!1572
Matthew Fernandez [Sat, 12 Sep 2020 20:48:47 +0000 (13:48 -0700)]
remove iffe interpreter that is no longer used
Matthew Fernandez [Sat, 12 Sep 2020 20:47:18 +0000 (13:47 -0700)]
remove cdt reference to iffe
Cdt does not use the iffe interpreter.
Matthew Fernandez [Sat, 12 Sep 2020 20:45:07 +0000 (13:45 -0700)]
remove static copy of sfio feature header for Windows
Related to #1422 and #1521.
Matthew Fernandez [Sat, 12 Sep 2020 20:44:32 +0000 (13:44 -0700)]
remove sfio feature input that is no longer used
Related to #1422 and #1521.
Matthew Fernandez [Sat, 12 Sep 2020 20:43:18 +0000 (13:43 -0700)]
remove autotools build steps for generating sfio feature header
This header is no longer used. Closes #1422 and #1521.
Matthew Fernandez [Sat, 12 Sep 2020 20:34:35 +0000 (13:34 -0700)]
remove sfio #include of feature header
No sfio code relies on the macros supplied by this dynamically generated header
any more. Related to #1422 and #1521.
Matthew Fernandez [Sat, 12 Sep 2020 20:26:35 +0000 (13:26 -0700)]
remove unused sftmp()
Matthew Fernandez [Sat, 12 Sep 2020 20:17:17 +0000 (13:17 -0700)]
remove unused sfpopen()
Matthew Fernandez [Sat, 12 Sep 2020 20:05:58 +0000 (13:05 -0700)]
remove dependence on _stream_peek and _socket_peek macros
Related to #1422 an #1521.
Matthew Fernandez [Sat, 12 Sep 2020 19:44:05 +0000 (12:44 -0700)]
remove disabled poll() code
The macro _lib_poll was undefined on all platforms that have select.h, which is
everything except Windows. Poll does not exist on Windows, so it was also
disabled there. Related to #1422 and #1521.
Matthew Fernandez [Sat, 12 Sep 2020 19:16:27 +0000 (12:16 -0700)]
remove unused sfstrrsrv macro
Matthew Fernandez [Sat, 12 Sep 2020 19:10:10 +0000 (12:10 -0700)]
remove unused _proto_open declaration
No C++ code #includes this file. Related to #1422 and #1521.
Matthew Fernandez [Sat, 12 Sep 2020 19:07:04 +0000 (12:07 -0700)]
remove block size optimization in sfio
Related to #1422 and #1521.
Matthew Fernandez [Sat, 12 Sep 2020 18:35:58 +0000 (11:35 -0700)]
remove use of _more_long_int and _more_void_int
These macros are created by the iffe interpreter, but we do not need to perform
this kind of compile time testing. Modern compilers are clever enough to
optimize sizeof comparisons. This change uses intptr_t and uintptr_t which are
technically not available until C99, but they are used elsewhere in the codebase
already. Related to #1422 and #1521.
Matthew Fernandez [Thu, 17 Sep 2020 04:26:06 +0000 (04:26 +0000)]
Merge branch '
82267661 -345e-483f-9d13-
ce254b31694d ' into 'master'
printf interface to agxbuf
See merge request graphviz/graphviz!1551
Matthew Fernandez [Sun, 6 Sep 2020 17:54:43 +0000 (10:54 -0700)]
simplify scanEntity with agxbprint
Matthew Fernandez [Sun, 6 Sep 2020 17:33:57 +0000 (10:33 -0700)]
simplify some agxbuf calls in gv_get_font
Matthew Fernandez [Sun, 6 Sep 2020 17:32:25 +0000 (10:32 -0700)]
simplify get_avail_faces with agxbprint
Matthew Fernandez [Sun, 6 Sep 2020 17:30:48 +0000 (10:30 -0700)]
simplify xdot_textspan with agxbprint
Matthew Fernandez [Sun, 6 Sep 2020 17:28:40 +0000 (10:28 -0700)]
simplify xdot_begin_anchor with agxbprint
Matthew Fernandez [Sun, 6 Sep 2020 17:27:38 +0000 (10:27 -0700)]
simplify xdot_style with agxbprint
Matthew Fernandez [Sun, 6 Sep 2020 17:26:05 +0000 (10:26 -0700)]
simplify xdot_points with agxbprint
Matthew Fernandez [Sun, 6 Sep 2020 17:24:22 +0000 (10:24 -0700)]
simplify xdot_str_xbuf with agxbprint
Matthew Fernandez [Sun, 6 Sep 2020 17:22:49 +0000 (10:22 -0700)]
simplify gvplugin_list with agxbprint