]> granicus.if.org Git - graphviz/log
graphviz
4 years agouniversally treat SFIO mode flags as unsigned
Matthew Fernandez [Sun, 9 Aug 2020 00:44:22 +0000 (17:44 -0700)]
universally treat SFIO mode flags as unsigned

This squashes 119 -Wsign-conversion compiler warnings.

4 years agoMerge branch 'start-windows-builds-directly' into 'master'
Magnus Jacobsson [Thu, 13 Aug 2020 15:56:55 +0000 (15:56 +0000)]
Merge branch 'start-windows-builds-directly' into 'master'

Start windows builds directly

See merge request graphviz/graphviz!1519

4 years agoMerge branch '1f838978-873d-47d6-a09e-6a8d76e62e4d' into 'master'
Matthew Fernandez [Thu, 13 Aug 2020 14:59:35 +0000 (14:59 +0000)]
Merge branch '1f838978-873d-47d6-a09e-6a8d76e62e4d' into 'master'

fix mismatch in gverrorf signature and callers

See merge request graphviz/graphviz!1503

4 years agoenable GCC and Clang to diagnose misuse of error() and errorf()
Matthew Fernandez [Sat, 8 Aug 2020 01:02:05 +0000 (18:02 -0700)]
enable GCC and Clang to diagnose misuse of error() and errorf()

This is the equivalent of 0a982672e53868cb394743a03b4e7b68951c282b for these
lib/ast functions.

4 years agoadd an explicit format string parameter to error() and errorf()
Matthew Fernandez [Sat, 8 Aug 2020 00:55:45 +0000 (17:55 -0700)]
add an explicit format string parameter to error() and errorf()

4 years agoremove now-unnecessary cast
Matthew Fernandez [Sat, 8 Aug 2020 00:31:23 +0000 (17:31 -0700)]
remove now-unnecessary cast

The function and the pointer it is being stored into now align in their
signature.

4 years agofix: pass format parameter into gverrorf explicitly
Matthew Fernandez [Sat, 8 Aug 2020 00:20:50 +0000 (17:20 -0700)]
fix: pass format parameter into gverrorf explicitly

The gverrorf function was prototyped in a way that did not align with a function
pointer it was stored into. On platforms with more forgiving varargs calling
conventions, everything worked out OK. However, on other platforms calling
gverrorf through this function pointer would result in stack corruption. This
change aligns gverrorf with the type of the function pointer in which it is
stored.

4 years agochange errorv calling convention to explicitly take a format string
Matthew Fernandez [Sat, 8 Aug 2020 00:04:04 +0000 (17:04 -0700)]
change errorv calling convention to explicitly take a format string

This function implicitly assumed its variable arguments contained a format
string as the first argument. This change pushes the assumption into the calling
convention, making it visible to the compiler.

4 years agoMerge branch 'f25b153d-dfca-415f-80f5-4135e26a9fde' into 'master'
Matthew Fernandez [Thu, 13 Aug 2020 02:30:58 +0000 (02:30 +0000)]
Merge branch 'f25b153d-dfca-415f-80f5-4135e26a9fde' into 'master'

make lib/ast/*.c #includes unambiguous

See merge request graphviz/graphviz!1501

4 years agoremove useless spin lock in lib/ast
Matthew Fernandez [Fri, 7 Aug 2020 03:08:26 +0000 (20:08 -0700)]
remove useless spin lock in lib/ast

This spin lock incorrectly implied to the reader that this code was thread safe.
IMHO there are two primary issues with this spin lock and one secondary issue:

  1. The intention of the spin lock is clearly to provide mutual exclusion
     within fmtbuf(). However this function returns a pointer to a static
     (thread-global) buffer. Excluding two threads from being in this function
     concurrently does not help if both exit the function with pointers into the
     same memory.

  2. The spin lock uses no atomics or volatile. As a result, accesses to the
     lock can be freely rearranged or coalesced, with no regard to thread
     interleaving. This can result in one thread never seeing another thread's
     update (unlock) to the lock. Even worse, my local compiler simply
     recognizes what is happening and omits the lock operations entirely.

  3. (secondary) If this lock worked as intended, it would spin writing to the
     lock variable. This would cause fairly pessimistic cache line bouncing as
     all waiting processors try to keep the line containing the lock in
     exclusive state in their local cache. A more performant way to achieve
     this is to spin waiting to see the lock value change *without* modifying
     the lock yourself. This allows multiple waiting processors to have the line
     in shared state, and minimizes cache coherence traffic.

4 years agomake lib/ast/*.c #includes unambiguous
Matthew Fernandez [Fri, 7 Aug 2020 02:30:41 +0000 (19:30 -0700)]
make lib/ast/*.c #includes unambiguous

Unfortunately we cannot also convert the headers because they are #included by
other libraries. We will do this in a future commit. Related to #1785.

4 years agoremove commented out #includes in lib/ast
Matthew Fernandez [Fri, 7 Aug 2020 02:29:36 +0000 (19:29 -0700)]
remove commented out #includes in lib/ast

4 years agoMerge branch 'remove-rtest-workaround-for-non-stable-cluster-order' into 'master'
Magnus Jacobsson [Wed, 12 Aug 2020 15:04:13 +0000 (15:04 +0000)]
Merge branch 'remove-rtest-workaround-for-non-stable-cluster-order' into 'master'

Remove rtest workaround for non stable cluster order

See merge request graphviz/graphviz!1518

4 years agoSpecify that the Windows CI builds dosn't need any previous job
Magnus Jacobsson [Sun, 9 Aug 2020 12:14:58 +0000 (14:14 +0200)]
Specify that the Windows CI builds dosn't need any previous job

4 years agoChanged to generate VERSION in Windows builds
Magnus Jacobsson [Wed, 12 Aug 2020 14:55:07 +0000 (16:55 +0200)]
Changed to generate VERSION in Windows builds

Instead of getting it from the portable_source stage. This allows the
Windows builds to start directly and not wait for the portable_source
stage.

4 years agoUpdate cluster releated nshare files with rtest.py -g
Magnus Jacobsson [Wed, 12 Aug 2020 07:01:10 +0000 (09:01 +0200)]
Update cluster releated nshare files with rtest.py -g

Using Windows MSBuild Graphviz development version
2.44.2~dev.20200812.0541 (20200812.0541).

Since https://gitlab.com/graphviz/graphviz/-/issues/1789 was fixed,
the output is stable.

4 years agoRemove rtest workaround for non stable cluster order
Magnus Jacobsson [Tue, 11 Aug 2020 15:55:48 +0000 (17:55 +0200)]
Remove rtest workaround for non stable cluster order

https://gitlab.com/graphviz/graphviz/-/issues/1789 and
https://gitlab.com/graphviz/graphviz/-/issues/1767

4 years agoMerge branch 'remove-workaround-for-msbuild-executables-have-wrong-version' into...
Magnus Jacobsson [Wed, 12 Aug 2020 06:51:25 +0000 (06:51 +0000)]
Merge branch 'remove-workaround-for-msbuild-executables-have-wrong-version' into 'master'

Remove test workaround for previously wrong version in MSBuild builds

See merge request graphviz/graphviz!1517

4 years agoRemove workaround for previously wrong version in MSBuild builds
Magnus Jacobsson [Tue, 11 Aug 2020 15:37:41 +0000 (17:37 +0200)]
Remove workaround for previously wrong version in MSBuild builds

https://gitlab.com/graphviz/graphviz/-/issues/1745

4 years agoMerge branch 'remove-config6-at-uninstall' into 'master'
Magnus Jacobsson [Wed, 12 Aug 2020 05:41:00 +0000 (05:41 +0000)]
Merge branch 'remove-config6-at-uninstall' into 'master'

Remove config6 when uninstalling Windows CMake Graphviz

Closes #1752

See merge request graphviz/graphviz!1516

4 years agoMerge branch 'B47EF71C-B166-4F10-96FD-B06894B84010' into 'master'
Matthew Fernandez [Wed, 12 Aug 2020 02:40:30 +0000 (02:40 +0000)]
Merge branch 'B47EF71C-B166-4F10-96FD-B06894B84010' into 'master'

remove legacy Travis CI config

See merge request graphviz/graphviz!1497

4 years agoremove legacy Travis CI config
Matthew Fernandez [Thu, 6 Aug 2020 00:20:29 +0000 (17:20 -0700)]
remove legacy Travis CI config

CI testing now happens on Gitlab.

4 years agoRemove config6 when uninstalling Windows CMake Graphviz
Magnus Jacobsson [Tue, 11 Aug 2020 15:23:58 +0000 (17:23 +0200)]
Remove config6 when uninstalling Windows CMake Graphviz

Fixes https://gitlab.com/graphviz/graphviz/-/issues/1752

4 years agoMerge branch 'fix-missing-version-in-windows-ci-artifacts' into 'master'
Magnus Jacobsson [Tue, 11 Aug 2020 17:49:25 +0000 (17:49 +0000)]
Merge branch 'fix-missing-version-in-windows-ci-artifacts' into 'master'

Correct filename of Windows exe installer and zip archive

Closes #1792

See merge request graphviz/graphviz!1514

4 years agoMerge branch 'remove-version-from-windows-cmake-install-path' into 'master'
Magnus Jacobsson [Tue, 11 Aug 2020 17:48:55 +0000 (17:48 +0000)]
Merge branch 'remove-version-from-windows-cmake-install-path' into 'master'

Set CPack installation directory to "Graphviz"

Closes #1748

See merge request graphviz/graphviz!1515

4 years agoMerge branch 'fix-cmake-exe-installer-package-version' into 'master'
Magnus Jacobsson [Tue, 11 Aug 2020 17:48:05 +0000 (17:48 +0000)]
Merge branch 'fix-cmake-exe-installer-package-version' into 'master'

Correct package version in CMake exe installer

Closes #1791

See merge request graphviz/graphviz!1513

4 years agoSet CPack installation directory to "Graphviz"
Magnus Jacobsson [Tue, 11 Aug 2020 12:03:16 +0000 (14:03 +0200)]
Set CPack installation directory to "Graphviz"

The default was to include the version in the installation path.

Fixes https://gitlab.com/graphviz/graphviz/-/issues/1748

4 years agoCorrect filename of Windows exe installer and zip archive
Magnus Jacobsson [Tue, 11 Aug 2020 07:47:20 +0000 (09:47 +0200)]
Correct filename of Windows exe installer and zip archive

Fixes https://gitlab.com/graphviz/graphviz/-/issues/1792

4 years agoCorrect package version in CMake exe installer
Magnus Jacobsson [Tue, 11 Aug 2020 07:36:59 +0000 (09:36 +0200)]
Correct package version in CMake exe installer

Fixes https://gitlab.com/graphviz/graphviz/-/issues/1791

4 years agofix edge attribute order confusion
Matthew Fernandez [Wed, 5 Aug 2020 00:47:15 +0000 (17:47 -0700)]
fix edge attribute order confusion

Certain edge attributes are constructed in advance of their being seen in the
input because Graphviz knows it may need default values for them. Later, if seen
in the input, the values of these attributes are updated.

This all works fine unless the order in which these initially-defaulted edge
attributes appear in the input does not match the order in which the default
versions are constructed by Graphviz internally. In this case, the order in
which the attributes are seen in the input is used to construct a dictionary of
them, but the original copies are used to index into attribute values.

In the particular test case added in this commit,

  digraph {
    { rank=same; n1; n2 }

    n2 -> n1 [ headport=s, arrowhead=normal ]
  }

arrowhead was constructed with symbol ID 0 and headport was constructed with
symbol ID 1. But then the later parsing of these attributes resulted in a
dictionary where the headport value was in ID 0 and the arrowhead value was in
ID 1. Indexing into this dictionary with the initially constructed E_arrowhead
resulted in incorrectly returning the value "s". This caused a spurious error
'Arrow type "s" unknown' as well as incorrect graph output.

Fixes #1444. Note that this may just be one of several issues resulting from
using these initially constructed E_* symbols.

4 years agoMerge branch 'use-preinstalled-grep-in-ci' into 'master'
Magnus Jacobsson [Mon, 10 Aug 2020 07:42:20 +0000 (07:42 +0000)]
Merge branch 'use-preinstalled-grep-in-ci' into 'master'

Use preinstalled grep instead of installing it in CI

See merge request graphviz/graphviz!1512

4 years agoUse preinstalled grep instead of installing it in CI
Magnus Jacobsson [Sun, 9 Aug 2020 20:28:13 +0000 (22:28 +0200)]
Use preinstalled grep instead of installing it in CI

Final step that fixes
https://gitlab.com/graphviz/graphviz/-/issues/1759.

4 years agoMerge branch 'use-preinstalled-diffutils-in-ci' into 'master'
Magnus Jacobsson [Mon, 10 Aug 2020 07:13:49 +0000 (07:13 +0000)]
Merge branch 'use-preinstalled-diffutils-in-ci' into 'master'

Use preinstalled diffutils instead of installing it in CI

See merge request graphviz/graphviz!1511

4 years agoUse preinstalled diffutils instead of installing it in CI
Magnus Jacobsson [Sun, 9 Aug 2020 20:07:46 +0000 (22:07 +0200)]
Use preinstalled diffutils instead of installing it in CI

One more step towards https://gitlab.com/graphviz/graphviz/-/issues/1759.

4 years agoMerge branch 'use-preinstalled-pytest-in-ci' into 'master'
Magnus Jacobsson [Mon, 10 Aug 2020 06:44:48 +0000 (06:44 +0000)]
Merge branch 'use-preinstalled-pytest-in-ci' into 'master'

Use preinstalled pytest instead of installing it in CI

See merge request graphviz/graphviz!1510

4 years agoUse preinstalled pytest instead of installing it in CI
Magnus Jacobsson [Sun, 9 Aug 2020 19:38:13 +0000 (21:38 +0200)]
Use preinstalled pytest instead of installing it in CI

One more step towards https://gitlab.com/graphviz/graphviz/-/issues/1759.

4 years agoMerge branch 'use-preinstalled-python3-in-ci' into 'master'
Magnus Jacobsson [Sun, 9 Aug 2020 19:03:10 +0000 (19:03 +0000)]
Merge branch 'use-preinstalled-python3-in-ci' into 'master'

Use preinstalled Python 3 instead of installing it in CI

See merge request graphviz/graphviz!1507

4 years agoUse preinstalled Python 3 instead of installing it in CI
Magnus Jacobsson [Sun, 9 Aug 2020 13:39:51 +0000 (15:39 +0200)]
Use preinstalled Python 3 instead of installing it in CI

One more step towards https://gitlab.com/graphviz/graphviz/-/issues/1759.

4 years agoMerge branch 'use-preinstalled-perl-in-ci' into 'master'
Magnus Jacobsson [Sun, 9 Aug 2020 18:13:39 +0000 (18:13 +0000)]
Merge branch 'use-preinstalled-perl-in-ci' into 'master'

Use preinstalled perl in CI

See merge request graphviz/graphviz!1502

4 years agofix segfault with large edge weights
Matthew Fernandez [Sun, 2 Aug 2020 16:37:49 +0000 (09:37 -0700)]
fix segfault with large edge weights

When passed a large edge weight, e.g. 1073741824, an integer overflow would
occur when calculating virtual weights. This would go on to cause a segfault as
calculations were increasingly thrown off by negative values.

This change detects when an overflow will occur and exits. Calling exit() from
within a deeply nested library function like this is not good practice, but we
don't have a better alternative right now. The call chain involves gvLayout()
whose interface to the plugins inherently has no way of reporting failure.

Fixes #1783.

4 years agofix typo in clustg
Matthew Fernandez [Tue, 4 Aug 2020 00:57:15 +0000 (17:57 -0700)]
fix typo in clustg

Fixes #1781.

4 years agoUse preinstalled perl instead of installing it in CI
Magnus Jacobsson [Fri, 7 Aug 2020 09:17:46 +0000 (11:17 +0200)]
Use preinstalled perl instead of installing it in CI

One more step towards https://gitlab.com/graphviz/graphviz/-/issues/1759.

4 years agoMerge branch 'adapt-to-moved-nsis' into 'master'
Magnus Jacobsson [Sun, 9 Aug 2020 10:17:21 +0000 (10:17 +0000)]
Merge branch 'adapt-to-moved-nsis' into 'master'

Adapt to moved NSIS install directory

See merge request graphviz/graphviz!1506

4 years agoAdapt to moved NSIS install directory
Magnus Jacobsson [Sun, 9 Aug 2020 09:16:53 +0000 (11:16 +0200)]
Adapt to moved NSIS install directory

4 years agoMerge branch 'use-preinstalled-nsis' into 'master'
Magnus Jacobsson [Sun, 9 Aug 2020 05:30:44 +0000 (05:30 +0000)]
Merge branch 'use-preinstalled-nsis' into 'master'

Use preinstalled nsis instead of installing it in CI

See merge request graphviz/graphviz!1505

4 years agoUse preinstalled nsis instead of installing it in CI
Magnus Jacobsson [Sun, 9 Aug 2020 04:52:51 +0000 (06:52 +0200)]
Use preinstalled nsis instead of installing it in CI

4 years agoMerge branch 'port-rtest.sh-to-python' into 'master'
Magnus Jacobsson [Sat, 8 Aug 2020 05:22:53 +0000 (05:22 +0000)]
Merge branch 'port-rtest.sh-to-python' into 'master'

Port rtest.sh to Python and enable rtest on Windows

Closes #1779

See merge request graphviz/graphviz!1496

4 years agoassign Cgraph IDs linearly
Matthew Fernandez [Sat, 1 Aug 2020 19:33:46 +0000 (12:33 -0700)]
assign Cgraph IDs linearly

Previously Cgraph only assigned odd IDs from the internal counter, because even
IDs were reserved for pointers derived from agstrdup. Now that we no longer use
pointers as IDs there is nothing special about an ID being even or odd.

4 years agofix: assign anonymous IDs to named entities
Matthew Fernandez [Sat, 1 Aug 2020 19:29:28 +0000 (12:29 -0700)]
fix: assign anonymous IDs to named entities

Instead of using string pointers as IDs, we now assign the IDs for named
entities exactly the same way we assign them for anonymous identities. This
works because we first check the internal map before creating any new ID, so
processing the same name twice will result in the same ID as before.

This fixes #1767. Now clusters within a graph are consistently processed in the
order in which they appear in the input file, rather than an order dependent on
pointers given out by the allocator.

4 years agostop relying on pointers-as-IDs to retrieve strings
Matthew Fernandez [Sat, 1 Aug 2020 19:05:08 +0000 (12:05 -0700)]
stop relying on pointers-as-IDs to retrieve strings

Now that strings are always stored in the internal map, they can be retrieved
from there instead of relying on the assumption that the ID aliases the name of
an entity. Related to #1767.

4 years agoadd non-local names to Cgraph internal map as well as local names
Matthew Fernandez [Sat, 1 Aug 2020 18:56:23 +0000 (11:56 -0700)]
add non-local names to Cgraph internal map as well as local names

This allows the internal name->id map to track *all* names. Related to #1767.

4 years agocheck internal map for IDs prior to creating one from a string
Matthew Fernandez [Sat, 1 Aug 2020 19:19:27 +0000 (12:19 -0700)]
check internal map for IDs prior to creating one from a string

This has no effect currently because the case that preceded this check was for
non-local names, that are not inserted into the internal map anyway. However, an
upcoming change will alter this behavior, so we want to make sure that if a name
already has a known ID it is found first. Related to #1767.

4 years agofix: take a copy of font name when caching fonts in Pango plugin
Matthew Fernandez [Sat, 1 Aug 2020 16:37:20 +0000 (09:37 -0700)]
fix: take a copy of font name when caching fonts in Pango plugin

The Pango plugin caches the last used font to save an expensive reconstruction
process each time it runs. To determine whether the cached font is eligible for
reuse, the name and size of the requested font are checked against the cache
entry. However the name of the cached font was only stored as a pointer to the
original name. The cached entry could outlive the original font, which could be
freed before a next call into the plugin. As a result, the plugin would perform
a strcmp using a stale freed pointer.

To address this we simply take a copy of the font name's string data instead of
just a pointer to it. There is no need to copy any of the other cached fields as
they are only accessed if the font name check finds the entry to be valid.

Related to #1767.

4 years agofix: suppress Xlib finalization if initialization failed
Matthew Fernandez [Sun, 2 Aug 2020 00:13:04 +0000 (17:13 -0700)]
fix: suppress Xlib finalization if initialization failed

The initialization function of a device plugin has no way of reporting failure
to its called. So an attempt to use the x11 back end calls xlib_finalize() even
if xlib_initialize() failed. To make this safe, we set a flag if initialization
succeeds and make xlib_finalize() a no-op if the flag is not set. Fixes #1776.

4 years agoMerge branch 'remove-unnecessary-cmake-install-in-ci' into 'master'
Magnus Jacobsson [Fri, 7 Aug 2020 17:50:21 +0000 (17:50 +0000)]
Merge branch 'remove-unnecessary-cmake-install-in-ci' into 'master'

Use existing CMake on GitLab Windows runner instead of installing it

See merge request graphviz/graphviz!1498

4 years agofix: cast overflow with large font sizes in Pango plugin
Matthew Fernandez [Sat, 1 Aug 2020 23:24:58 +0000 (16:24 -0700)]
fix: cast overflow with large font sizes in Pango plugin

When using an abnormally large font size, computing the Pango units for the size
would overflow. This resulted in an assertion failure in Pango when seeing a
negative size value. This issue was found by Google Autofuzz project. This
fixes #1314.

4 years agoremove now unnecessary detection of str[n]casecmp
Matthew Fernandez [Sun, 2 Aug 2020 02:03:16 +0000 (19:03 -0700)]
remove now unnecessary detection of str[n]casecmp

Related to #1775.

4 years agoremove empty compat.h header
Matthew Fernandez [Sun, 2 Aug 2020 01:53:28 +0000 (18:53 -0700)]
remove empty compat.h header

This header was not doing anything useful.

4 years agoreplace in-tree str[n]casecmp implementations with libc
Matthew Fernandez [Sun, 2 Aug 2020 01:42:17 +0000 (18:42 -0700)]
replace in-tree str[n]casecmp implementations with libc

Instead of carrying multiple implementations of these functions in the Graphviz
tree, we now call the built-in support on the current platform. Closes #1775.

4 years agoadd an abstraction for strcasecmp
Matthew Fernandez [Sun, 2 Aug 2020 01:13:13 +0000 (18:13 -0700)]
add an abstraction for strcasecmp

Related to #1775.

4 years agoUse existing cmake instead of installing it
Magnus Jacobsson [Wed, 5 Aug 2020 14:42:10 +0000 (16:42 +0200)]
Use existing cmake instead of installing it

The first step towards https://gitlab.com/graphviz/graphviz/-/issues/1759.

4 years agoMerge branch 'use-windows-dependencies-submodules-from-the-graphviz-gitlab-group...
Magnus Jacobsson [Fri, 7 Aug 2020 09:10:16 +0000 (09:10 +0000)]
Merge branch 'use-windows-dependencies-submodules-from-the-graphviz-gitlab-group' into 'master'

Change to get windows/dependencies submodules from graphviz

See merge request graphviz/graphviz!1500

4 years agoMerge branch 'add-missing-changelog-entry-for-fixed-win-msbuild-version' into 'master'
Magnus Jacobsson [Fri, 7 Aug 2020 05:11:45 +0000 (05:11 +0000)]
Merge branch 'add-missing-changelog-entry-for-fixed-win-msbuild-version' into 'master'

Add missing CHANGELOG entry for fixed version in MSBuilds

See merge request graphviz/graphviz!1499

4 years agoSimplify pytests that call rtest.py
Magnus Jacobsson [Thu, 6 Aug 2020 15:16:44 +0000 (17:16 +0200)]
Simplify pytests that call rtest.py

4 years agomake sfio #includes unambiguous
Matthew Fernandez [Sat, 1 Aug 2020 00:51:24 +0000 (17:51 -0700)]
make sfio #includes unambiguous

This change makes the #includes of lib/sfio headers unambiguous within the
lib/sfio C sources. The upcoming plan is to also make the header #includes and
any of lib/sfio's dependents also unambiguous this way. Related to #1785.

4 years agomake an include of vthread.h relative
Matthew Fernandez [Sat, 1 Aug 2020 00:23:40 +0000 (17:23 -0700)]
make an include of vthread.h relative

This is a step along the way towards less ambiguous #includes. Eventually this
should become a more clearly qualified #include like <sfio/vthread.h>. Related
to #1785.

4 years agoremove lib/sfio include directory addition of lib/vmalloc in msbuild
Matthew Fernandez [Sat, 1 Aug 2020 00:22:29 +0000 (17:22 -0700)]
remove lib/sfio include directory addition of lib/vmalloc in msbuild

Sfio does not appear to rely on vmalloc.

4 years agoremove lib/sfio include directory addition of lib/ast in autotools build
Matthew Fernandez [Sat, 1 Aug 2020 00:21:07 +0000 (17:21 -0700)]
remove lib/sfio include directory addition of lib/ast in autotools build

Sfio does not appear to rely on any headers from lib/ast.

4 years agoChange to get windows/dependencies submodules from graphviz
Magnus Jacobsson [Thu, 6 Aug 2020 11:08:51 +0000 (13:08 +0200)]
Change to get windows/dependencies submodules from graphviz

The windows/dependencies repositories are now hosted as subprojects in
the GitLab Graphviz group:

* https://gitlab.com/graphviz/graphviz-build-utilities
* https://gitlab.com/graphviz/graphviz-windows-dependencies

4 years agoAdd CHANGELOG entry for fixed version in MSBuilds
Magnus Jacobsson [Thu, 6 Aug 2020 09:55:58 +0000 (11:55 +0200)]
Add CHANGELOG entry for fixed version in MSBuilds

4 years agoUpdate nshare with rtest.py -g using Windows MSBuild Release 2.44.1
Magnus Jacobsson [Wed, 5 Aug 2020 09:31:21 +0000 (11:31 +0200)]
Update nshare with rtest.py -g using Windows MSBuild Release 2.44.1

4 years agoAdd temporary skip of rtests using ps shapefile on Windows
Magnus Jacobsson [Wed, 5 Aug 2020 05:32:42 +0000 (07:32 +0200)]
Add temporary skip of rtests using ps shapefile on Windows

Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1790

4 years agoAdd temporary skip of ps & gv diff on Windows for specific rtests
Magnus Jacobsson [Tue, 4 Aug 2020 11:40:29 +0000 (13:40 +0200)]
Add temporary skip of ps & gv diff on Windows for specific rtests

May fail because of https://gitlab.com/graphviz/graphviz/-/issues/1789

4 years agoDon't treat Windows as an unrecognized system
Magnus Jacobsson [Mon, 3 Aug 2020 06:01:25 +0000 (08:01 +0200)]
Don't treat Windows as an unrecognized system

4 years agoInstall diffutils in Windows CI
Magnus Jacobsson [Sun, 2 Aug 2020 10:02:31 +0000 (12:02 +0200)]
Install diffutils in Windows CI

4 years agoAdd temporary skip of PNG diff for Windows CMake rtest
Magnus Jacobsson [Mon, 3 Aug 2020 09:50:13 +0000 (11:50 +0200)]
Add temporary skip of PNG diff for Windows CMake rtest

Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1788

4 years agoAdd temporary skip of rtests using shapefile for Windows MSBuild Debug
Magnus Jacobsson [Sun, 2 Aug 2020 07:17:02 +0000 (09:17 +0200)]
Add temporary skip of rtests using shapefile for Windows MSBuild Debug

Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1787

4 years agoAdd temporary skip of rtests using overlap=false for Windows MSBuild
Magnus Jacobsson [Sat, 1 Aug 2020 16:20:40 +0000 (18:20 +0200)]
Add temporary skip of rtests using overlap=false for Windows MSBuild

Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1269

4 years agoAdd temporary skip of format png:gd for Windows CMake rtest
Magnus Jacobsson [Fri, 31 Jul 2020 22:03:05 +0000 (00:03 +0200)]
Add temporary skip of format png:gd for Windows CMake rtest

Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1786

4 years agoAdd new rtest.sh that calls rtest.py
Magnus Jacobsson [Mon, 3 Aug 2020 05:13:52 +0000 (07:13 +0200)]
Add new rtest.sh that calls rtest.py

4 years agoRun new rtest.py script instead of rtest.sh
Magnus Jacobsson [Fri, 31 Jul 2020 15:11:38 +0000 (17:11 +0200)]
Run new rtest.py script instead of rtest.sh

4 years agoPort rtest.sh ksh code to Python in rtest.py
Magnus Jacobsson [Thu, 30 Jul 2020 20:31:04 +0000 (22:31 +0200)]
Port rtest.sh ksh code to Python in rtest.py

Resolves https://gitlab.com/graphviz/graphviz/-/issues/1779

The reason this is a separate commit from the previoust commit, which
contains the renaming of the file, is to trick git to show the changes
as a one-file diff regardless of the similarity index, rather than one
deleted and one added file. This makes it easier to compare the ksh
code to the Python code.

4 years agoRename rtest.sh to rtest.py
Magnus Jacobsson [Mon, 3 Aug 2020 10:48:05 +0000 (12:48 +0200)]
Rename rtest.sh to rtest.py

The reason this is a separate commit from the next commit, which
contains the changed content, is to trick git to show the changes as a
one-file diff regardless of the similarity index, rather than one
deleted and one added file. This makes it easier to compare the ksh
code to the Python code.

4 years agoadd GVPR Vim syntax
Matthew Fernandez [Wed, 29 Jul 2020 02:05:50 +0000 (19:05 -0700)]
add GVPR Vim syntax

Closes #1762.

4 years agocompiler annotations to explain calling convention of agerr and friends
Matthew Fernandez [Wed, 29 Jul 2020 02:38:55 +0000 (19:38 -0700)]
compiler annotations to explain calling convention of agerr and friends

This change teaches suitably enlightened compilers (Clang and GCC) more about
how these functions are intended to be called. When told to detect misuse of
format strings (`-Wformat`), they can now detect incorrect calls like that fixed
in 31ef5a3c31214d77137e4b36603a2a97576e851e.

4 years agoremove unnecessary temporary buffer to construct error message
Matthew Fernandez [Thu, 30 Jul 2020 00:11:13 +0000 (17:11 -0700)]
remove unnecessary temporary buffer to construct error message

The motivation for this change is to avoid passing a variable to agerr which
triggers so -Wformat-security errors after some upcoming changes. However, it's
nice to be able to just simplify this code anyway.

4 years agoremove exception-style control flow in lib/rbtree
Matthew Fernandez [Sun, 26 Jul 2020 21:01:27 +0000 (14:01 -0700)]
remove exception-style control flow in lib/rbtree

Fixes #1742.

4 years agoexpose StackDestroy function in stack.h
Matthew Fernandez [Sun, 26 Jul 2020 20:37:43 +0000 (13:37 -0700)]
expose StackDestroy function in stack.h

4 years agoremove some dead code
Matthew Fernandez [Sun, 26 Jul 2020 20:31:44 +0000 (13:31 -0700)]
remove some dead code

4 years agoremove legacy RBTree comment
Matthew Fernandez [Sun, 26 Jul 2020 20:28:07 +0000 (13:28 -0700)]
remove legacy RBTree comment

The assertions depending on this macro were refactored in
40ef32e7c7adca0a1217135d8d3b1c582e75787e.

4 years agoremove compiled RBTree test binary
Matthew Fernandez [Sun, 26 Jul 2020 20:22:48 +0000 (13:22 -0700)]
remove compiled RBTree test binary

We can rebuild this using makefile.txt in lib/rbtree if necessary. The existing
committed binary was out of date.

4 years agode-duplicate gvc.def
Matthew Fernandez [Sun, 26 Jul 2020 21:16:39 +0000 (14:16 -0700)]
de-duplicate gvc.def

Closes #1761.

4 years agoMerge branch 'drive-all-tests-from-pytest' into 'master'
Magnus Jacobsson [Fri, 31 Jul 2020 22:34:22 +0000 (22:34 +0000)]
Merge branch 'drive-all-tests-from-pytest' into 'master'

Drive all tests from pytest

Closes #1772

See merge request graphviz/graphviz!1483

4 years agoMerge branch 'centralized-version-generation' into 'master'
Magnus Jacobsson [Fri, 31 Jul 2020 17:21:14 +0000 (17:21 +0000)]
Merge branch 'centralized-version-generation' into 'master'

Single source of truth of Grahviz version for all build systems: autotools, CMake & MSbuild

Closes #1745

See merge request graphviz/graphviz!1476

4 years agomissing changelog entry for the previous commit
Matthew Fernandez [Fri, 31 Jul 2020 14:42:16 +0000 (07:42 -0700)]
missing changelog entry for the previous commit

4 years agofix: out-of-bounds write on invalid label
Matthew Fernandez [Sun, 26 Jul 2020 02:31:01 +0000 (19:31 -0700)]
fix: out-of-bounds write on invalid label

When the label for a node cannot be parsed (due to it being malformed), it falls
back on the symbol name of the node itself. I.e. the default label the node
would have had if it had no label attribute at all. However, this is applied by
dynamically altering the node's label to "\N", a shortcut for the symbol name of
the node. All of this is fine, however if the hand written label itself is
shorter than the literal string "\N", not enough memory would have been
allocated to write "\N" into the label text.

Here we account for the possibility of error during label parsing, and assume
that the label text may need to be overwritten with "\N" after the fact. Fixes
issue #1700.

4 years agoAdd temporary skip of some gvpr example tests
Magnus Jacobsson [Thu, 30 Jul 2020 15:37:44 +0000 (17:37 +0200)]
Add temporary skip of some gvpr example tests

Hangs because of https://gitlab.com/graphviz/graphviz/-/issues/1784

4 years agoCorrect 32-bit Windows check in large graphs test
Magnus Jacobsson [Thu, 30 Jul 2020 06:16:45 +0000 (08:16 +0200)]
Correct 32-bit Windows check in large graphs test

The previous check was true also for 64-bit Windows since in this case
"win32" stands for the Windows API. For details, see:

* https://docs.microsoft.com/en-us/windows/win32/apiindex/windows-api-list
* https://docs.python.org/3/library/sys.html#sys.platform
* https://softwareengineering.stackexchange.com/questions/356464/why-does-software-use-the-win32-name

Note that the new check does not actually check that the Windows OS is
32 bit, but rather that the Python interpreter is. This means that the
test will be skipped in the unlikely event that a 32-bit Python
interpreter is run on a 64-bit Windows OS. This is *not* the case in
our current CI pipeline on gitlab.com. The test does run there.

To check the Windows OS itself seems to be very complicated according
to
https://stackoverflow.com/questions/2208828/detect-64bit-os-windows-in-python/12578715
and none of the solutions worked for me.

Note also that the check does *not* check whether Graphviz has been
compiled for 32-bit or 64-bit which also seems ok according to the
results from our current CI pipeline.

More background can be found at:

* https://gitlab.com/graphviz/graphviz/-/merge_requests/1345
* https://gitlab.com/graphviz/graphviz/-/issues/1710
* https://gitlab.com/graphviz/graphviz/-/merge_requests/1370
* https://gitlab.com/graphviz/graphviz/-/issues/1698

4 years agoAdd workaround for gvpr not supporting abs path on Windows
Magnus Jacobsson [Tue, 28 Jul 2020 12:20:22 +0000 (14:20 +0200)]
Add workaround for gvpr not supporting abs path on Windows

https://gitlab.com/graphviz/graphviz/-/issues/1780

4 years agoAdd temporary skip of examples test for MSBuild builds on Windows
Magnus Jacobsson [Mon, 27 Jul 2020 21:07:25 +0000 (23:07 +0200)]
Add temporary skip of examples test for MSBuild builds on Windows

Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1777.