Matthew Fernandez [Thu, 27 Aug 2020 00:32:14 +0000 (17:32 -0700)]
drop compatibility with Yacc, Bison < 3 in lib/cgraph/grammar.y
This will allow us to use api.prefix with brace syntax in an upcoming commit.
Bison 3.0 was released in July 2013 [0], so this seems an acceptable base line
requirement from now on.
[0]: http://savannah.gnu.org/forum/forum.php?forum_id=7663
Matthew Fernandez [Tue, 25 Aug 2020 01:23:54 +0000 (18:23 -0700)]
suppress warnings from using Bison extensions in lib/cgraph/grammar.y
We don't currently use any, but are about to introduce one. For some more back
story on this, we quote the Bison 3.0 release notes:
*** Use of YACC='bison -y'
TL;DR: With Autoconf <= 2.69, pass -Wno-yacc to (AM_)YFLAGS if you use
Bison extensions.
Traditional Yacc generates 'y.tab.c' whatever the name of the input file.
Therefore Makefiles written for Yacc expect 'y.tab.c' (and possibly
'y.tab.h' and 'y.outout') to be generated from 'foo.y'.
To this end, for ages, AC_PROG_YACC, Autoconf's macro to look for an
implementation of Yacc, was using Bison as 'bison -y'. While it does
ensure compatible output file names, it also enables warnings for
incompatibilities with POSIX Yacc. In other words, 'bison -y' triggers
warnings for Bison extensions.
Autoconf 2.70+ fixes this incompatibility by using YACC='bison -o y.tab.c'
(which also generates 'y.tab.h' and 'y.output' when needed).
Alternatively, disable Yacc warnings by passing '-Wno-yacc' to your Yacc
flags (YFLAGS, or AM_YFLAGS with Automake).
Matthew Fernandez [Tue, 1 Sep 2020 00:37:49 +0000 (00:37 +0000)]
Merge branch '
61ec04a4-5eb2-47e7-a491-
cd20773f1460' into 'master'
remove use of ABS in favor of abs/fabs
See merge request graphviz/graphviz!1540
Matthew Fernandez [Wed, 26 Aug 2020 01:14:39 +0000 (18:14 -0700)]
remove now unused ABS macros
Matthew Fernandez [Wed, 26 Aug 2020 01:05:38 +0000 (18:05 -0700)]
use abs() instead of ABS() for taking the absolute value of ints
Similar to
b88ebe0548dd412ea415d6cfc410d91117270277 and the previous commit,
this replaces uses of the macro ABS with standard library functionality for
readability and maintainability.
Matthew Fernandez [Wed, 26 Aug 2020 00:50:39 +0000 (17:50 -0700)]
use fabs() instead of ABS() for taking the absolute value of reals
The type real is #defined to double, so we can use the same replacement as in
b88ebe0548dd412ea415d6cfc410d91117270277 to simplify this code.
Matthew Fernandez [Wed, 26 Aug 2020 00:20:51 +0000 (17:20 -0700)]
remove unused collide macro
Matthew Fernandez [Wed, 26 Aug 2020 00:08:57 +0000 (17:08 -0700)]
remove unused ABS definition
Matthew Fernandez [Sun, 30 Aug 2020 02:03:53 +0000 (02:03 +0000)]
Merge branch '
CBC6D01D-6639-4C01-BFB5-
0B336AD01D0E' into 'master'
remove executability from some source files
See merge request graphviz/graphviz!1546
Matthew Fernandez [Sat, 29 Aug 2020 00:42:56 +0000 (17:42 -0700)]
remove executability from some source files
Matthew Fernandez [Sun, 30 Aug 2020 01:45:57 +0000 (01:45 +0000)]
Merge branch '
E30B249E-79E8-4BF0-9276-
C11C1464A32C' into 'master'
remove unused variable
See merge request graphviz/graphviz!1548
Matthew Fernandez [Sat, 29 Aug 2020 18:29:47 +0000 (11:29 -0700)]
remove unused variable
Magnus Jacobsson [Sat, 29 Aug 2020 17:54:10 +0000 (17:54 +0000)]
Merge branch 'add-metrics-report-with-warnings-to-ci' into 'master'
Add a metrics report with warnings to pull requests
See merge request graphviz/graphviz!1547
Magnus Jacobsson [Fri, 28 Aug 2020 12:51:45 +0000 (14:51 +0200)]
Add a metrics report with warnings to CI
Matthew Fernandez [Fri, 28 Aug 2020 14:07:46 +0000 (14:07 +0000)]
Merge branch '
dfabfa2e-74d2-4bec-b68e-
90ea7c501b77' into 'master'
remove unused sfdcseekable
See merge request graphviz/graphviz!1534
Matthew Fernandez [Sat, 22 Aug 2020 16:24:31 +0000 (09:24 -0700)]
remove unused sfdcseekable
Matthew Fernandez [Thu, 27 Aug 2020 14:44:09 +0000 (14:44 +0000)]
Merge branch '
571f1f84-a955-4e9b-9911-
445f7435dc5a' into 'master'
fix Pango plugin build on macOS
See merge request graphviz/graphviz!1533
Matthew Fernandez [Sun, 23 Aug 2020 18:30:08 +0000 (11:30 -0700)]
update CMake Cairo discovery to match PangoCairo
This does the equivalent of the previous commit, to now use pkg-config to
discover Cairo on non-Windows platforms and to suppress the CMake warning:
CMake Warning (dev) at ...FindPackageHandleStandardArgs.cmake:272 (message):
The package name passed to `find_package_handle_standard_args` (CAIRO) does
not match the name of the calling package (Cairo). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindCairo.cmake:12 (find_package_handle_standard_args)
CMakeLists.txt:81 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
Matthew Fernandez [Wed, 19 Aug 2020 00:03:24 +0000 (17:03 -0700)]
fix Pango plugin build on macOS
Compiling plugin/pango depends on the discovery of PangoCairo and its dependent
libraries which is handled by cmake/FindPangoCairo.cmake. This file was assuming
all libraries were available at default system paths, which is not true on e.g.
macOS when you install libraries via Homebrew or Macports. We now simply ask
pkg-config to find all necessary information for us (unless we are on Windows).
This also incidentally cleans up the following warning issued by CMake in CI:
CMake Warning (dev) at C:/…/FindPackageHandleStandardArgs.cmake:272 (message):
The package name passed to `find_package_handle_standard_args` (PANGOCAIRO)
does not match the name of the calling package (PangoCairo). This can lead
to problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindPangoCairo.cmake:20 (find_package_handle_standard_args)
CMakeLists.txt:85 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
Magnus Jacobsson [Wed, 26 Aug 2020 14:53:06 +0000 (14:53 +0000)]
Merge branch 'fix-test-examples-exit-status-check' into 'master'
Fix test examples exit status check
See merge request graphviz/graphviz!1542
Magnus Jacobsson [Wed, 26 Aug 2020 14:52:16 +0000 (14:52 +0000)]
Merge branch 'fix-1770-warning-path-too-long-using-cmake-windows-installer' into 'master'
Fix path too long using Windows CMake build .exe-installer
Closes #1770
See merge request graphviz/graphviz!1541
Magnus Jacobsson [Wed, 26 Aug 2020 12:58:11 +0000 (14:58 +0200)]
Fix test examples exit status check
Magnus Jacobsson [Wed, 26 Aug 2020 04:48:11 +0000 (06:48 +0200)]
Fix path too long using Windows CMake build .exe-installer
Fixed by using updated preinstalled NSIS with string length 8192.
Fixes https://gitlab.com/graphviz/graphviz/-/issues/1770.
Magnus Jacobsson [Wed, 26 Aug 2020 05:25:53 +0000 (05:25 +0000)]
Merge branch 'add-linux-cmake-builds' into 'master'
Add ubuntu18-04-cmake-build
See merge request graphviz/graphviz!1539
Magnus Jacobsson [Wed, 26 Aug 2020 04:56:41 +0000 (04:56 +0000)]
Merge branch 'use-updated-winflexbison' into 'master'
Use updated winflexbison version 2.5.22
See merge request graphviz/graphviz!1538
Magnus Jacobsson [Thu, 2 Jul 2020 21:07:25 +0000 (23:07 +0200)]
Add ubuntu18-04-cmake-build
Magnus Jacobsson [Tue, 25 Aug 2020 18:25:33 +0000 (20:25 +0200)]
Adapt MSBuild project files to renamed win_flex and win_bison
Magnus Jacobsson [Tue, 25 Aug 2020 18:50:15 +0000 (20:50 +0200)]
Adapt setup-build-utilities.ps1 to to renamed win_flex and win_bison
Magnus Jacobsson [Tue, 25 Aug 2020 18:11:12 +0000 (20:11 +0200)]
Use updated preinstalled winflexbison version 2.5.22
Updates bison to version 3.5.0 and flex to version 2.6.4.
Magnus Jacobsson [Tue, 25 Aug 2020 16:36:56 +0000 (16:36 +0000)]
Merge branch 'execute-test-examples' into 'master'
Execute test examples
See merge request graphviz/graphviz!1532
Magnus Jacobsson [Thu, 20 Aug 2020 14:14:27 +0000 (16:14 +0200)]
Skip execution of segfaulting neatopack.c in test examples
Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1800
Magnus Jacobsson [Tue, 18 Aug 2020 19:49:10 +0000 (21:49 +0200)]
Add execution of compiled test examples
Magnus Jacobsson [Tue, 18 Aug 2020 17:51:57 +0000 (19:51 +0200)]
Use dynamic linking on Windows in test_examples.py
Magnus Jacobsson [Tue, 25 Aug 2020 15:58:03 +0000 (15:58 +0000)]
Merge branch 'add-windows-build-ps1-scripts-and-refactor-ci' into 'master'
Add windows build PowerShell scripts and refactor CI
See merge request graphviz/graphviz!1529
Matthew Fernandez [Tue, 25 Aug 2020 15:18:21 +0000 (15:18 +0000)]
Merge branch '
01a7249f-7db1-4539-81e5-
eb2016375520' into 'master'
use fabs() instead of ABS() for taking the absolute value of a double
See merge request graphviz/graphviz!1531
Matthew Fernandez [Thu, 20 Aug 2020 00:03:10 +0000 (17:03 -0700)]
use fabs() instead of ABS() for taking the absolute value of a double
The fabs() function is available via math.h, even prior to C89 so there's no
reason not to use it. Avoiding the macro eliminates some mental overhead for the
reader. Also fabs has some more lenient semantics with respect to denormal
inputs, so this change results in slightly more efficient code.
Magnus Jacobsson [Mon, 17 Aug 2020 09:55:00 +0000 (11:55 +0200)]
Replace Windows build code in CI config with new build script
Magnus Jacobsson [Sun, 16 Aug 2020 08:51:02 +0000 (10:51 +0200)]
Add windows/bin/setup-and-build.ps1
Magnus Jacobsson [Mon, 17 Aug 2020 14:22:11 +0000 (16:22 +0200)]
Add windows/bin/build.ps1
Magnus Jacobsson [Sun, 16 Aug 2020 15:03:47 +0000 (17:03 +0200)]
Add windows/bin/setup-build-utilities.ps1
Magnus Jacobsson [Mon, 17 Aug 2020 10:36:26 +0000 (12:36 +0200)]
Use updated preinstalled grep
Magnus Jacobsson [Mon, 24 Aug 2020 05:12:27 +0000 (05:12 +0000)]
Merge branch '
f05c0222-3ab9-4bbc-9951-
4e62fbf682f1' into 'master'
use a cleaner pattern for temporary directory management in tests
See merge request graphviz/graphviz!1537
Magnus Jacobsson [Mon, 17 Aug 2020 17:40:55 +0000 (19:40 +0200)]
Refactor some code to be the same for cmake & msbuild
Matthew Fernandez [Sun, 23 Aug 2020 20:42:19 +0000 (13:42 -0700)]
use a cleaner pattern for temporary directory management in tests
This switches a pattern of:
tmp = tempfile.mkdtemp()
atexist.register(shutil.rmtree, tmp)
...
to:
with tempfile.TemporaryDirectory() as tmp:
...
Apart from being less error prone, this also unconditionally cleans up the
temporary directory, even when an uncaught exception is thrown.
Magnus Jacobsson [Sun, 23 Aug 2020 18:41:59 +0000 (18:41 +0000)]
Merge branch 'fix-windows-artifacts-directory-platform-name' into 'master'
Fix windows artifacts directory platform name
Closes #1803
See merge request graphviz/graphviz!1536
Matthew Fernandez [Sun, 23 Aug 2020 18:11:44 +0000 (18:11 +0000)]
Merge branch '
4f254459-24e2-4a5d-8064-
05fe425fec0d' into 'master'
fix macOS lexer compilation
See merge request graphviz/graphviz!1535
Magnus Jacobsson [Sat, 22 Aug 2020 08:27:06 +0000 (10:27 +0200)]
Fix platform name in Windows CI artifacts directory
By renaming $Env:platform to $Env:project_platform. This avoids a
clash with the environment set up with vcvarsall.bat which changes
$Env:platform to the *architecture* which is 'x86' or 'x64' while we
use 'Win32' or 'x64' as the *project-level* platform.
From
https://docs.microsoft.com/en-us/visualstudio/ide/how-to-configure-projects-to-target-platforms?view=vs-2019:
"Note
The Win32 platform name is used for C++ projects, and it means
x86. Visual Studio considers both project-level platforms and
solution-level platforms, and the project platforms come from the
language-specific project systems. C++ projects use Win32 and x64, but
the solution platforms use x86 and x64. When you choose x86 as the
solution configuration, Visual Studio selects the Win32 platform for
C++ projects."
Fixes https://gitlab.com/graphviz/graphviz/-/issues/1803.
Magnus Jacobsson [Sun, 23 Aug 2020 08:25:50 +0000 (10:25 +0200)]
Make parsing of vcvarsall.bat output more robust
Only consider variable names with alpanumeric characters, underscore
and parentheses. This avoids most problems when parsing output
containing multi-line variable values with arbitrary text.
In GitLab CI, one of the environment variables is CI_COMMIT_MESSAGE. In the commit immediately following this commit there is an URL containing an equal sign that caused the error below:
Set-Content : An object at the specified path
env:\https://docs.microsoft.com/en-us/visualstudio/ide/how-to-configure-projects-to-target-platforms?view does not
exist, or has been filtered by the -Include or -Exclude parameter.
At line:3 char:5
+ Set-Content "env:\$($matches[1])" $matches[2];
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (System.String[]:String[]) [Set-Content], Exception
+ FullyQualifiedErrorId : ItemNotFound,Microsoft.PowerShell.Commands.SetContentCommand
Matthew Fernandez [Sat, 22 Aug 2020 20:12:16 +0000 (13:12 -0700)]
fix macOS lexer compilation
Commits
3b00c1fc6b949cc9744d075e0d2b2ed4b1c46763 and
5162bfe8e72624ef7988b217e289476325365810 removed find-and-replace of an isatty
string, which exposed the following compilation error on macOS:
[ 69%] Building C object lib/cgraph/CMakeFiles/cgraph.dir/grammar.c.o
[ 70%] Building C object lib/cgraph/CMakeFiles/cgraph.dir/scan.c.o
/Users/north/src/graphviz/build/lib/cgraph/scan.c:1706:12: error: expected
identifier or '('
extern int isatty (int );
^
scan.l:44:19: note: expanded from macro 'isatty'
#define isatty(x) 0
^
1 error generated.
make[2]: *** [lib/cgraph/CMakeFiles/cgraph.dir/scan.c.o] Error 1
make[1]: *** [lib/cgraph/CMakeFiles/cgraph.dir/all] Error 2
make: *** [all] Error 2
which conveniently explained why this find-and-replace had existed in the first
place. Rather than reverting this, the present change uses a more principled way
of instructing Flex not to call isatty().
This reverts
40a5a33ac76e4d3d22662fd51e7c0e1d2be3100b. Related to #1796, !1522,
!1523.
Matthew Fernandez [Sat, 22 Aug 2020 16:18:11 +0000 (16:18 +0000)]
Merge branch '
615aeb22-3c3f-43de-a7d4-
e4d13756436f' into 'master'
suppress two compiler warnings
See merge request graphviz/graphviz!1528
Matthew Fernandez [Sun, 16 Aug 2020 17:14:19 +0000 (10:14 -0700)]
suppress two compiler warnings
Commits
02d2cacf8730f1e4347afd72b159c91fafed2182 and
80a9dc3a3d7a1bff49db3f8e40fc03e91ca2261e accidentally introduced two new
compiler warnings to the build. Following this change, the CMake build returns
to warning-free on Linux with GCC 8.3.0. The Autotools build still sprays
warnings, but I think it's worth taking proactive steps like this to never
introduce new warnings.
Though this change looks like it has a semantic effect, it does not. The base
member of these structs is the first member, used as an inheritance-style
pattern.
Matthew Fernandez [Fri, 21 Aug 2020 14:34:53 +0000 (14:34 +0000)]
Merge branch '
74fde7bb-0d55-48c9-9685-
97ba876159e9' into 'master'
use a dynamic buffer in strdup_and_subst_obj0
See merge request graphviz/graphviz!1527
Matthew Fernandez [Sat, 15 Aug 2020 21:13:34 +0000 (14:13 -0700)]
use a dynamic buffer when expanding text replacements
This change is intended to guard against bugs like that fixed in
fbefeb31989130c48b965cc9a2f0ad0cac07015c. The buffer used to construct the
result string now dynamically expands so we do not need to manually calculate
its extent in advance. Related to #1676.
Matthew Fernandez [Sat, 15 Aug 2020 21:04:28 +0000 (14:04 -0700)]
fix: use of size_t in agxbuf.h with no definition
This worked so far because files #including this always included something else
that brought in stddef.h prior to #including agxbuf.h
Matthew Fernandez [Sat, 15 Aug 2020 20:30:48 +0000 (13:30 -0700)]
replace agxbuse/alloc pattern with agxbdisown
Instead of retrieving the contents of a (possibly dynamically allocated) buffer
and then allocating new space for a copy, we can simply take ownership of the
original buffer. This saves an extra unnecessary allocation.
Matthew Fernandez [Sat, 15 Aug 2020 20:06:43 +0000 (13:06 -0700)]
add a new 'disown' API for agxbuf
Magnus Jacobsson [Tue, 18 Aug 2020 10:09:17 +0000 (10:09 +0000)]
Merge branch 'fix-test_1767-fails-on-agread-on-Windows' into 'master'
Fix test 1767 fails on agread on windows
Closes #1794
See merge request graphviz/graphviz!1524
Magnus Jacobsson [Tue, 11 Aug 2020 15:46:46 +0000 (17:46 +0200)]
Enable test_1767 on Windows for CMake builds
The test is still skipped for MSBuild builds because of
https://gitlab.com/graphviz/graphviz/-/issues/1777
Magnus Jacobsson [Thu, 13 Aug 2020 15:54:05 +0000 (17:54 +0200)]
Use dynamic run-time library in test_1767
From
https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library?view=vs-2019:
/MD
Causes the application to use the multithread-specific and
DLL-specific version of the run-time library.
Fixes https://gitlab.com/graphviz/graphviz/-/issues/1794
Magnus Jacobsson [Tue, 18 Aug 2020 09:43:24 +0000 (09:43 +0000)]
Merge branch 'remove-obsolete-and-incorrect-yacc-mangling' into 'master'
Remove obsolete and incorrect mangling of yacc output
Closes #1796
See merge request graphviz/graphviz!1523
Magnus Jacobsson [Fri, 14 Aug 2020 08:45:14 +0000 (10:45 +0200)]
Remove obsolete autotools isatty mangling of yacc output
Magnus Jacobsson [Fri, 14 Aug 2020 08:44:57 +0000 (10:44 +0200)]
Remove obsolete autotools unsigned long mangling of yacc output
Magnus Jacobsson [Fri, 14 Aug 2020 07:32:01 +0000 (09:32 +0200)]
Remove obsolete CMake isatty mangling of yacc output
Magnus Jacobsson [Thu, 13 Aug 2020 11:11:06 +0000 (13:11 +0200)]
Remove obsolete and incorrect CMake unsigned long mangling of yacc output
It is (no longer?) necessary and it was anyway incorrect in that it
converted unsigned long to uint_64_t which doesn't exist.
Fixes https://gitlab.com/graphviz/graphviz/-/issues/1796
Magnus Jacobsson [Tue, 18 Aug 2020 08:56:11 +0000 (08:56 +0000)]
Merge branch 'stop-windows-pipeline-on-powershell-cmdlet-failure' into 'master'
Make the Windows pipeline stop on PowerShell cmdlet failure
See merge request graphviz/graphviz!1526
Magnus Jacobsson [Fri, 14 Aug 2020 12:55:30 +0000 (14:55 +0200)]
Make the Windows pipeline stop on PowerShell cmdlet failure
Note that this doesn't affect failures from .exe programs (but that is
already handled by the GitLab Shared Windows Runner). See
https://stackoverflow.com/questions/
9948517/how-to-stop-a-powershell-script-on-the-first-error.
Matthew Fernandez [Sat, 15 Aug 2020 17:38:24 +0000 (17:38 +0000)]
Merge branch '
f9559306-4b8b-48e8-88af-
675f1b3b2bd5' into 'master'
fix a couple of out-of-bounds reads and writes
Closes #1676
See merge request graphviz/graphviz!1509
Matthew Fernandez [Sun, 9 Aug 2020 23:48:30 +0000 (16:48 -0700)]
fix incorrect allocation computation in strdup_and_subst_obj0
The logic in this function does two passes through computing the construction of
a string, the first to determine how many bytes will be written and the second
to write those bytes. Unfortunately the logic in these two passes did not match,
and some cases would cause the first pass to underestimate how many bytes would
be written by the second pass. As a result, the second pass would overrun the
extent of allocated memory and begin writing out of bounds.
As far as I can tell, this bug has existed since at least 2010. I think this
code should be refactored in future to use a dynamically expanding string buffer
(e.g. agxbuf) instead of relying on this fragile pairing of logic.
The test case added in this commit was something found by Google Autofuzz
project that triggered a crash in Graphviz due to reading a NULL pointer. After
fixing the initial crash (the previous commit), this out of bounds write was
observable using ASan. This commit fixes #1676.
Matthew Fernandez [Sun, 9 Aug 2020 23:50:14 +0000 (16:50 -0700)]
fix: avoid accessing min/max rep on a NULL cluster
When entering compile_samerank, the parent cluster could be NULL, which was then
incorrectly dereferenced in the two cases affected in this change. This issue
was found by Google Autofuzz project. Related to #1676.
Matthew Fernandez [Sat, 15 Aug 2020 16:49:55 +0000 (16:49 +0000)]
Merge branch '
a279c545-8647-42be-9f46-
d9eb8d4f872d' into 'master'
fix segfault when passing a malformed newrank and node
Closes #1724
See merge request graphviz/graphviz!1508
Matthew Fernandez [Sun, 9 Aug 2020 19:51:50 +0000 (12:51 -0700)]
fix: avoid looking for max/min representative on an invalid edge end
This avoids a segfault resulting from using a NULL pointer. Fixes #1724.
Matthew Fernandez [Sun, 9 Aug 2020 18:57:31 +0000 (11:57 -0700)]
avoid use of a temporary buffer when constructing an error message
agerr() supports printf-style arguments, so it was not necessary to manually
build the error string in a temporary buffer.
Magnus Jacobsson [Sat, 15 Aug 2020 05:13:42 +0000 (05:13 +0000)]
Merge branch 'fix-windows-artifact-archiving' into 'master'
Fix windows artifact archiving
Closes #1797
See merge request graphviz/graphviz!1525
Magnus Jacobsson [Fri, 14 Aug 2020 10:04:08 +0000 (12:04 +0200)]
Fix publishing of Windows build artifcats
The COLLECTION was missing since we no longer get it from the
portable_source stage because the Windows builds start directly and do
not wait for the portable_source stage. Therefor we generate it in the
Windows builds directly instead.
This regresion was introduced in
https://gitlab.com/magjac/graphviz/-/commit/
3ac7e1c54fe5f8f4bb304796ab77901c73401aee.
Fixes https://gitlab.com/graphviz/graphviz/-/issues/1797
Magnus Jacobsson [Fri, 14 Aug 2020 10:01:59 +0000 (12:01 +0200)]
Change autogen.sh to get collection from gen_version.py
Magnus Jacobsson [Fri, 14 Aug 2020 09:58:18 +0000 (11:58 +0200)]
Add --collection option
Magnus Jacobsson [Fri, 14 Aug 2020 09:53:22 +0000 (11:53 +0200)]
Change to all-numeric version entry format and add collection
The version is now specified with a new collection variable which
shall be "stable" or "development" and an all-numeric version. The
"~dev" (and the .<commiter date>) suffix will be added by the script.
Magnus Jacobsson [Fri, 14 Aug 2020 09:52:35 +0000 (11:52 +0200)]
Add /usr/bin/env python3 shebang to gen_version.py
Matthew Fernandez [Fri, 14 Aug 2020 15:04:55 +0000 (15:04 +0000)]
Merge branch '
299df24c-1ec4-4b41-b594-
66450f5ae4e8' into 'master'
misc cleanup
See merge request graphviz/graphviz!1504
Matthew Fernandez [Sun, 9 Aug 2020 04:33:51 +0000 (21:33 -0700)]
remove register hints
These do little to nothing on modern compilers.
Matthew Fernandez [Sun, 9 Aug 2020 03:32:50 +0000 (20:32 -0700)]
remove some compiler warnings from ~-ing bits field
Suppresses 15 compilers warnings.
Matthew Fernandez [Sun, 9 Aug 2020 03:17:09 +0000 (20:17 -0700)]
remove yet another -Wconversion warning
Matthew Fernandez [Sun, 9 Aug 2020 03:16:56 +0000 (20:16 -0700)]
remove another -Wconversion flags warning
Matthew Fernandez [Sun, 9 Aug 2020 03:16:32 +0000 (20:16 -0700)]
remove a -Wconversion warning
Matthew Fernandez [Sun, 9 Aug 2020 02:39:48 +0000 (19:39 -0700)]
suppress -Wconversion warnings from int promotion due to ~ of flags
Squashes 11 warnings.
Matthew Fernandez [Sun, 9 Aug 2020 02:38:07 +0000 (19:38 -0700)]
avoid mixing int and short unsigned wrt flags
Matthew Fernandez [Sun, 9 Aug 2020 01:48:41 +0000 (18:48 -0700)]
avoid storing pointer diff in an int
The distance between endb and next was being stored in an int variable. While
this should not exceed the bounds of an int during normal usage, it's risky to
store a pointer difference in a narrower type this way.
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.
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
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
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.
Matthew Fernandez [Sat, 8 Aug 2020 00:55:45 +0000 (17:55 -0700)]
add an explicit format string parameter to error() and errorf()
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.
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.
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.
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
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.
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.
Matthew Fernandez [Fri, 7 Aug 2020 02:29:36 +0000 (19:29 -0700)]
remove commented out #includes in lib/ast
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