]> granicus.if.org Git - graphviz/log
graphviz
4 years agounconditionally use bestalloc in vmopen()
Matthew Fernandez [Sat, 11 Jul 2020 21:16:14 +0000 (14:16 -0700)]
unconditionally use bestalloc in vmopen()

This policy is no longer configurable because we simply use the system
allocator, malloc.

4 years agoexpose bestalloc, bestfree, bestresize to other parts of vmalloc
Matthew Fernandez [Sat, 11 Jul 2020 21:07:20 +0000 (14:07 -0700)]
expose bestalloc, bestfree, bestresize to other parts of vmalloc

4 years agoremove unnecessary 'reg' annotations in vmalloc
Matthew Fernandez [Sat, 11 Jul 2020 21:00:12 +0000 (14:00 -0700)]
remove unnecessary 'reg' annotations in vmalloc

Whether these parameters are provided in registers or on the stack is entirely
dictated by the platform's calling convention these days.

4 years agoremove now unused Vmdcsbrk
Matthew Fernandez [Sat, 11 Jul 2020 20:57:04 +0000 (13:57 -0700)]
remove now unused Vmdcsbrk

Closes #1603, #1757.

4 years agoremove a use of Vmdcsbrk discipline
Matthew Fernandez [Sat, 11 Jul 2020 20:40:27 +0000 (13:40 -0700)]
remove a use of Vmdcsbrk discipline

The discipline is no longer used in vmalloc.

4 years agoremove now unused Vmdcheap
Matthew Fernandez [Sat, 11 Jul 2020 20:37:02 +0000 (13:37 -0700)]
remove now unused Vmdcheap

4 years agoremove now unused parameters to vmopen()
Matthew Fernandez [Sat, 11 Jul 2020 19:18:47 +0000 (12:18 -0700)]
remove now unused parameters to vmopen()

4 years agoback vmalloc by the system allocator
Matthew Fernandez [Sat, 11 Jul 2020 19:13:39 +0000 (12:13 -0700)]
back vmalloc by the system allocator

Here we replace the custom vmalloc allocator implementation with calls to
malloc, while preserving the overall pool abstraction. That is, it is still
possible to not free any of your vmalloc allocations but then rely on a final
call to vmclose() to clean them up. Note that this also removes the vmprivate
functionality which is no longer relevant.

4 years agozero out the result of a vmnewof()
Matthew Fernandez [Sat, 11 Jul 2020 22:33:55 +0000 (15:33 -0700)]
zero out the result of a vmnewof()

This is the only instance of a call to vmnewof() that appears to rely on the
semantics of the returned memory having been zeroed. We are about to make some
changes that make it impossible for the allocator to zero extra memory in a
vmresize() because it does not know the size of the original allocation. This
change makes it safe for vmresize() to stop providing zeroed out extra memory.

4 years agoremove agheap()
Matthew Fernandez [Sat, 11 Jul 2020 17:53:56 +0000 (10:53 -0700)]
remove agheap()

Accessing the internals of the allocator via Cgraph is no longer supported.

4 years agoMerge branch '9bc7e01e-5811-4256-92ed-85b323261351' into 'master'
Matthew Fernandez [Sat, 11 Jul 2020 17:36:14 +0000 (17:36 +0000)]
Merge branch '9bc7e01e-5811-4256-92ed-85b323261351' into 'master'

clean up unused parts of vmalloc

Closes #1757, #1603, #1424, and #975

See merge request graphviz/graphviz!1456

4 years agoMerge branch 'date2' into 'master'
Matthew Fernandez [Sat, 11 Jul 2020 17:03:10 +0000 (17:03 +0000)]
Merge branch 'date2' into 'master'

gv_doc_template.tcl: Pass "-gmt True" to support reproducible dates.

See merge request graphviz/graphviz!1454

4 years agoMerge branch '509c2d33-d4f6-4cde-bd74-1e6bf700d8eb' into 'master'
Matthew Fernandez [Sat, 11 Jul 2020 15:21:00 +0000 (15:21 +0000)]
Merge branch '509c2d33-d4f6-4cde-bd74-1e6bf700d8eb' into 'master'

test C examples in CI

See merge request graphviz/graphviz!1455

4 years agoMerge branch '4b832e74-d1b7-45bf-8b80-32ba42272311' into 'master'
Matthew Fernandez [Fri, 10 Jul 2020 00:46:53 +0000 (00:46 +0000)]
Merge branch '4b832e74-d1b7-45bf-8b80-32ba42272311' into 'master'

remove legacy malloc.h stub

See merge request graphviz/graphviz!1453

4 years agoMerge branch 'c2a8c9c1-033c-43dc-82f9-8424e1da84c6' into 'master'
Matthew Fernandez [Fri, 10 Jul 2020 00:07:02 +0000 (00:07 +0000)]
Merge branch 'c2a8c9c1-033c-43dc-82f9-8424e1da84c6' into 'master'

remove some compiler warnings

See merge request graphviz/graphviz!1452

4 years agoadd compilation of the C examples to the test suite
Matthew Fernandez [Sat, 4 Jul 2020 17:28:35 +0000 (10:28 -0700)]
add compilation of the C examples to the test suite

4 years agoinstall Graphviz dev libraries during CI testing
Matthew Fernandez [Sun, 5 Jul 2020 18:53:42 +0000 (11:53 -0700)]
install Graphviz dev libraries during CI testing

This allows us to begin testing code that compiles and links against Graphviz
libraries.

4 years agofix: update simple.c example for latest API
Matthew Fernandez [Sat, 4 Jul 2020 17:12:05 +0000 (10:12 -0700)]
fix: update simple.c example for latest API

4 years agofix: update neatopack.c example for latest API
Matthew Fernandez [Sat, 4 Jul 2020 17:11:12 +0000 (10:11 -0700)]
fix: update neatopack.c example for latest API

4 years agofix: update dot.c example for latest API
Matthew Fernandez [Sat, 4 Jul 2020 17:10:16 +0000 (10:10 -0700)]
fix: update dot.c example for latest API

4 years agofix: update example.c to latest API
Matthew Fernandez [Sat, 4 Jul 2020 17:09:22 +0000 (10:09 -0700)]
fix: update example.c to latest API

4 years agoremove unused vmwalk API
Matthew Fernandez [Sun, 5 Jul 2020 23:59:36 +0000 (16:59 -0700)]
remove unused vmwalk API

4 years agoremove legacy function prototypes
Matthew Fernandez [Sun, 5 Jul 2020 23:50:58 +0000 (16:50 -0700)]
remove legacy function prototypes

4 years agoremove unused vmstat API
Matthew Fernandez [Sun, 5 Jul 2020 23:48:19 +0000 (16:48 -0700)]
remove unused vmstat API

4 years agoremove unused vmset API
Matthew Fernandez [Sun, 5 Jul 2020 23:40:24 +0000 (16:40 -0700)]
remove unused vmset API

4 years agoremove unused vmregion API
Matthew Fernandez [Sun, 5 Jul 2020 23:31:42 +0000 (16:31 -0700)]
remove unused vmregion API

4 years agoremove unused vmtrbusy API
Matthew Fernandez [Sun, 5 Jul 2020 23:23:11 +0000 (16:23 -0700)]
remove unused vmtrbusy API

4 years agoremove unused vmtrace API
Matthew Fernandez [Sun, 5 Jul 2020 23:14:10 +0000 (16:14 -0700)]
remove unused vmtrace API

4 years agoremove undefs of stdlib.h functions that are not relied upon
Matthew Fernandez [Sun, 5 Jul 2020 23:02:24 +0000 (16:02 -0700)]
remove undefs of stdlib.h functions that are not relied upon

4 years agoremove unused vmsize API
Matthew Fernandez [Sun, 5 Jul 2020 22:51:36 +0000 (15:51 -0700)]
remove unused vmsize API

4 years agoremove unused vmalign API
Matthew Fernandez [Sun, 5 Jul 2020 22:41:07 +0000 (15:41 -0700)]
remove unused vmalign API

4 years agoremove unused vmcompact API
Matthew Fernandez [Sun, 5 Jul 2020 22:32:37 +0000 (15:32 -0700)]
remove unused vmcompact API

4 years agoremove unused vmdisc API
Matthew Fernandez [Sun, 5 Jul 2020 22:22:40 +0000 (15:22 -0700)]
remove unused vmdisc API

4 years agoremove unused vmsegment API
Matthew Fernandez [Sun, 5 Jul 2020 22:14:27 +0000 (15:14 -0700)]
remove unused vmsegment API

4 years agoremove unused Vmdebug allocator method
Matthew Fernandez [Sun, 5 Jul 2020 22:03:13 +0000 (15:03 -0700)]
remove unused Vmdebug allocator method

4 years agoremove unused Vmpool allocator method
Matthew Fernandez [Sun, 5 Jul 2020 21:55:12 +0000 (14:55 -0700)]
remove unused Vmpool allocator method

4 years agoremove unused Vmlast allocator method
Matthew Fernandez [Sun, 5 Jul 2020 21:47:17 +0000 (14:47 -0700)]
remove unused Vmlast allocator method

4 years agoremove no longer used Vmprofile allocator method
Matthew Fernandez [Sun, 5 Jul 2020 21:30:15 +0000 (14:30 -0700)]
remove no longer used Vmprofile allocator method

4 years agoremove malloc interception within vmalloc
Matthew Fernandez [Sun, 5 Jul 2020 21:09:39 +0000 (14:09 -0700)]
remove malloc interception within vmalloc

Not in use currently. Fixes #975, #1424.

4 years agoremove VMFL allocation interceptors
Matthew Fernandez [Sun, 5 Jul 2020 20:48:42 +0000 (13:48 -0700)]
remove VMFL allocation interceptors

These were not in use. There are now more convenient ways to profile allocation.

4 years agoremove support for vmalloc debugging in libexpr
Matthew Fernandez [Sat, 4 Jul 2020 16:31:16 +0000 (09:31 -0700)]
remove support for vmalloc debugging in libexpr

This is part of a series of changes to refactor libexpr to use the standard
system allocator (malloc) instead of vmalloc.

4 years agoMerge branch 'B68D1126-4542-465E-ABB7-F05DF3258801' into 'master'
Matthew Fernandez [Sun, 5 Jul 2020 15:09:52 +0000 (15:09 +0000)]
Merge branch 'B68D1126-4542-465E-ABB7-F05DF3258801' into 'master'

vector.c cleanup

See merge request graphviz/graphviz!1450

4 years agoMerge branch 'b470c54b-7fe1-4771-a64e-963fcf34bc13' into 'master'
Matthew Fernandez [Sat, 4 Jul 2020 16:52:40 +0000 (16:52 +0000)]
Merge branch 'b470c54b-7fe1-4771-a64e-963fcf34bc13' into 'master'

avoid 'transparent is not a known color' warning

Closes #1449

See merge request graphviz/graphviz!1447

4 years agogv_doc_template.tcl: Pass "-gmt True" to support reproducible dates.
Vagrant Cascadian [Mon, 1 Jun 2020 23:37:44 +0000 (23:37 +0000)]
gv_doc_template.tcl: Pass "-gmt True" to support reproducible dates.

While the code already uses SOURCE_DATE_EPOCH, it also needs to ensure
that the times are emitted in UTC/GMT, otherwise building on machines
configured with different timezones may result in different embedded
timestamps.

Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
4 years agoremove no longer relevant malloc.h detection
Matthew Fernandez [Fri, 3 Jul 2020 20:19:57 +0000 (13:19 -0700)]
remove no longer relevant malloc.h detection

Related to #1242.

4 years agoremove no longer needed malloc.h suppression
Matthew Fernandez [Fri, 3 Jul 2020 20:09:44 +0000 (13:09 -0700)]
remove no longer needed malloc.h suppression

Bison only includes the legacy malloc.h header when using alloca() on Windows,
when YYSTACK_USE_ALLOCA is defined. The Graphviz build does not define this for
any generated parsers. Related to #1242.

4 years agoremove legacy malloc.h includes
Matthew Fernandez [Fri, 3 Jul 2020 19:51:05 +0000 (12:51 -0700)]
remove legacy malloc.h includes

This header was superseded by stdlib.h. Related to #1242.

4 years agosuppress compiler warning from qsort() call
Matthew Fernandez [Fri, 3 Jul 2020 18:21:47 +0000 (11:21 -0700)]
suppress compiler warning from qsort() call

4 years agoremove use of deprecated pango_cairo_font_map_create_context
Matthew Fernandez [Fri, 3 Jul 2020 18:00:02 +0000 (11:00 -0700)]
remove use of deprecated pango_cairo_font_map_create_context

This API was deprecated in version 1.22 of Pango [0], released in 2008 [1]. The
one place that supported both the new and old API was still always calling the
old API as the build system does no HAVE_PANGO_FONT_MAP_CREATE_CONTEXT
detection.

  [0]: https://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html#pango-cairo-font-map-create-context
  [1]: https://gitlab.gnome.org/GNOME/pango/-/commit/06c4c3a87c7b54d0ca987e27d4478e4078ccf747

4 years agoMerge branch 'bd40bdf5-3761-4ae6-b1ef-f7904ff251ba' into 'master'
Matthew Fernandez [Fri, 3 Jul 2020 17:20:22 +0000 (17:20 +0000)]
Merge branch 'bd40bdf5-3761-4ae6-b1ef-f7904ff251ba' into 'master'

remove some -Wcast-qual compiler warnings

See merge request graphviz/graphviz!1446

4 years agoMerge branch 'dbdb31b0-dc0d-4b04-a62e-767d0fa0868e' into 'master'
Matthew Fernandez [Wed, 1 Jul 2020 00:38:52 +0000 (00:38 +0000)]
Merge branch 'dbdb31b0-dc0d-4b04-a62e-767d0fa0868e' into 'master'

fix memory leak in find_all_cycles()

See merge request graphviz/graphviz!1439

4 years agoMerge branch '2B9AE17E-6066-4038-B391-5C51411ED77D' into 'master'
Matthew Fernandez [Wed, 1 Jul 2020 00:03:40 +0000 (00:03 +0000)]
Merge branch '2B9AE17E-6066-4038-B391-5C51411ED77D' into 'master'

remove index.html fragment

See merge request graphviz/graphviz!1443

4 years agoMerge branch '5ACFD17E-A8C7-4FE9-80D0-38DF90EA199D' into 'master'
Matthew Fernandez [Tue, 30 Jun 2020 14:06:49 +0000 (14:06 +0000)]
Merge branch '5ACFD17E-A8C7-4FE9-80D0-38DF90EA199D' into 'master'

fix: remove generated patchwork.1.pdf during distclean

See merge request graphviz/graphviz!1437

4 years agodelete commented out development code in vector.c
Matthew Fernandez [Tue, 30 Jun 2020 02:34:03 +0000 (19:34 -0700)]
delete commented out development code in vector.c

4 years agoremove unnecessary null deallocator for StringVector
Matthew Fernandez [Tue, 30 Jun 2020 02:32:51 +0000 (19:32 -0700)]
remove unnecessary null deallocator for StringVector

The underlying vector implementation anticipates that the deallocator may be
null, so there is no need for this empty implementation.

4 years agoremove unnecessary intdeallocator for IntegerVector
Matthew Fernandez [Tue, 30 Jun 2020 02:29:40 +0000 (19:29 -0700)]
remove unnecessary intdeallocator for IntegerVector

The underlying vector implementation anticipates that the destructor may be
null, so there is no need to provide an empty deallocator. We could simply
delete the IntegerVector implementation as nothing is currently using it, but it
looks like it may be of use in dealing with #1554.

4 years agocheck for allocation failure in Vector_new
Matthew Fernandez [Tue, 30 Jun 2020 02:26:12 +0000 (19:26 -0700)]
check for allocation failure in Vector_new

This function checked if its second allocation to the vector's backing array
failed, but did not check if the original data structure allocation failed. It
is somewhat unlikely callers are currently equipped to handle this failure
anyway, but we may as well be consistent here.

4 years agoremove unused buf_len constant
Matthew Fernandez [Tue, 2 Jun 2020 03:19:00 +0000 (20:19 -0700)]
remove unused buf_len constant

4 years agoMerge branch 'return-to-2.45-dev' into 'master'
Magnus Jacobsson [Mon, 29 Jun 2020 12:28:56 +0000 (12:28 +0000)]
Merge branch 'return-to-2.45-dev' into 'master'

Move back to 2.45 development series

See merge request graphviz/graphviz!1449

4 years agoMove back to 2.45 development series
Magnus Jacobsson [Mon, 29 Jun 2020 09:29:47 +0000 (11:29 +0200)]
Move back to 2.45 development series

4 years agoMerge branch 'stable-release-2.44.1' into 'master' 2.44.1
Magnus Jacobsson [Mon, 29 Jun 2020 08:46:02 +0000 (08:46 +0000)]
Merge branch 'stable-release-2.44.1' into 'master'

Stable Release 2.44.1

See merge request graphviz/graphviz!1448

4 years agoStable Release 2.44.1
Magnus Jacobsson [Mon, 29 Jun 2020 07:59:34 +0000 (09:59 +0200)]
Stable Release 2.44.1

4 years agoMerge branch 'cmake-graphviz-version-from-autogen' into 'master'
Magnus Jacobsson [Mon, 29 Jun 2020 07:02:02 +0000 (07:02 +0000)]
Merge branch 'cmake-graphviz-version-from-autogen' into 'master'

CMake Graphviz version from autogen

See merge request graphviz/graphviz!1440

4 years agoGenerate build date in UTC also in CMake
Magnus Jacobsson [Mon, 29 Jun 2020 06:06:44 +0000 (08:06 +0200)]
Generate build date in UTC also in CMake

This is what autogen.sh does.

4 years agoRemove obsolete CMakeLists.txt update from DEVELOPERS.md
Magnus Jacobsson [Thu, 25 Jun 2020 10:37:05 +0000 (12:37 +0200)]
Remove obsolete CMakeLists.txt update from DEVELOPERS.md

4 years agoAllow build date to be overridden by cmake -DDATE=
Magnus Jacobsson [Wed, 24 Jun 2020 12:45:42 +0000 (14:45 +0200)]
Allow build date to be overridden by cmake -DDATE=

4 years agoAdd generation of DATE file containing build date
Magnus Jacobsson [Wed, 24 Jun 2020 12:40:25 +0000 (14:40 +0200)]
Add generation of DATE file containing build date

4 years agoChange to use patch version in the Windows installer
Magnus Jacobsson [Wed, 24 Jun 2020 11:07:14 +0000 (13:07 +0200)]
Change to use patch version in the Windows installer

This changes the version in the Graphviz installer .exe produced by
CMake to use the patch version number instead of the build
date. Still, if the patch version is "$GRAPHVIZ_VERSION_DATE", the
patch version will be set to the build date. This conforms with how
the Linux packages are created.

This change affects the filename of the installer, the version
presented to the user in the installer GUI, the installation path and
the version presented by the running software.

4 years agoAllow version to be overridden by cmake -DVERSION=
Magnus Jacobsson [Tue, 23 Jun 2020 14:46:58 +0000 (16:46 +0200)]
Allow version to be overridden by cmake -DVERSION=

Example:

cmake -G "Visual Studio 16 2019" -A x64 -DGRAPHVIZ_VERSION_STRING="47.11.20200623.1234" ..

4 years agoMake CMake get Graphviz version from autogen.sh by parsing it
Magnus Jacobsson [Thu, 18 Jun 2020 11:08:04 +0000 (13:08 +0200)]
Make CMake get Graphviz version from autogen.sh by parsing it

This will make autotools and CMake builds have a single source of
truth for the Graphviz version.

First, the major, minor and patch versions are retrieved. If the patch
version is "$GRAPHVIZ_VERSION_DATE", the patch version is set to the
committer date of the latest commit. This effectively repeals part of
the intention of 266ff5ee80b2d91231907e90ec650154f5225aa5: "Don't
encode build date stamp in it to be able to create reproducable
builds".

4 years agoMerge branch 'gitlab-ci-windows' into 'master'
Magnus Jacobsson [Mon, 29 Jun 2020 04:24:49 +0000 (04:24 +0000)]
Merge branch 'gitlab-ci-windows' into 'master'

Windows builds in the Gitlab CI/CD pipeline

See merge request graphviz/graphviz!1438

4 years agoavoid 'transparent is not a known color' warning
Matthew Fernandez [Mon, 29 Jun 2020 00:08:07 +0000 (17:08 -0700)]
avoid 'transparent is not a known color' warning

When using the SVG color scheme, Graphviz would emit a spurious warning. This
change is Steve Roush's solution. Closes #1449.

4 years agoremove some -Wcast-qual compiler warnings
Matthew Fernandez [Sat, 27 Jun 2020 21:24:58 +0000 (14:24 -0700)]
remove some -Wcast-qual compiler warnings

4 years agoMake Windows binaries contain version and platform in filename
Magnus Jacobsson [Thu, 25 Jun 2020 17:27:21 +0000 (19:27 +0200)]
Make Windows binaries contain version and platform in filename

4 years agoRemove Appveyor stuff from DEVELOPERS.md
Magnus Jacobsson [Thu, 25 Jun 2020 10:32:34 +0000 (12:32 +0200)]
Remove Appveyor stuff from DEVELOPERS.md

4 years agoFix linting errors in DEVELOPERS.md
Magnus Jacobsson [Thu, 25 Jun 2020 10:18:26 +0000 (12:18 +0200)]
Fix linting errors in DEVELOPERS.md

4 years agoDon't show progress from choco installs
Magnus Jacobsson [Wed, 24 Jun 2020 19:30:17 +0000 (21:30 +0200)]
Don't show progress from choco installs

4 years agoAdd deploy of Windows binaries to www2.graphviz.org
Magnus Jacobsson [Mon, 22 Jun 2020 14:50:41 +0000 (16:50 +0200)]
Add deploy of Windows binaries to www2.graphviz.org

Final commit that resolves
https://gitlab.com/graphviz/graphviz/-/issues/1713.

4 years agoConvert lab_gamut data to plain array (was array of struct)
Magnus Jacobsson [Mon, 22 Jun 2020 13:56:47 +0000 (15:56 +0200)]
Convert lab_gamut data to plain array (was array of struct)

4 years agoDisable code analysis for lab_gamut
Magnus Jacobsson [Mon, 22 Jun 2020 13:32:12 +0000 (15:32 +0200)]
Disable code analysis for lab_gamut

4 years agoAdd Windows build jobs to GitLab pipeline
Magnus Jacobsson [Tue, 16 Jun 2020 21:02:44 +0000 (23:02 +0200)]
Add Windows build jobs to GitLab pipeline

4 years agoRetarget to Visual Studio 2019 and toolset v142
Magnus Jacobsson [Mon, 15 Jun 2020 14:23:43 +0000 (16:23 +0200)]
Retarget to Visual Studio 2019 and toolset v142

4 years agoMerge branch 'e467ae7f-137b-4133-a0f7-868171fc13db' into 'master'
Matthew Fernandez [Sat, 27 Jun 2020 00:48:06 +0000 (00:48 +0000)]
Merge branch 'e467ae7f-137b-4133-a0f7-868171fc13db' into 'master'

some lib/gvc simplification

See merge request graphviz/graphviz!1435

4 years agoMerge branch 'dac2636e-2144-4c57-8e9c-33fc072b6642' into 'master'
Matthew Fernandez [Sat, 27 Jun 2020 00:02:24 +0000 (00:02 +0000)]
Merge branch 'dac2636e-2144-4c57-8e9c-33fc072b6642' into 'master'

remove legacy lib/agraph

Closes #1549

See merge request graphviz/graphviz!1434

4 years agoremove index.html fragment
Matthew Fernandez [Fri, 26 Jun 2020 00:57:04 +0000 (17:57 -0700)]
remove index.html fragment

4 years agoMerge branch 'master' of ssh://gitlab.com/graphviz/graphviz into 0B0BFA8E-A762-45A4...
Matthew Fernandez [Fri, 26 Jun 2020 00:52:24 +0000 (17:52 -0700)]
Merge branch 'master' of ssh://gitlab.com/graphviz/graphviz into 0B0BFA8E-A762-45A4-8F56-030AD90FA42E

4 years agoMerge branch '349F18B3-F9F4-487E-BED4-E534CF4FCF59' into 'master'
Matthew Fernandez [Fri, 26 Jun 2020 00:07:30 +0000 (00:07 +0000)]
Merge branch '349F18B3-F9F4-487E-BED4-E534CF4FCF59' into 'master'

lib/ast cleanup

See merge request graphviz/graphviz!1433

4 years agofix memory leak in vector allocation
Matthew Fernandez [Thu, 25 Jun 2020 02:01:05 +0000 (19:01 -0700)]
fix memory leak in vector allocation

Address Sanitizer detected a few instances of the following:

  Direct leak of 168 byte(s) in 7 object(s) allocated from:
    #0 0x7f4bc2724330 in __interceptor_malloc (/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f4bc24b1ea3 in vec_new /tmp/tmp.m68Z0dFAYs/graphviz/lib/common/routespl.c:918
    #2 0x7f4bc24b291a in find_all_cycles /tmp/tmp.m68Z0dFAYs/graphviz/lib/common/routespl.c:1073
    #3 0x7f4bc24b2b64 in get_cycle_centroid /tmp/tmp.m68Z0dFAYs/graphviz/lib/common/routespl.c:1121
    #4 0x7f4bc24b3c5c in makeStraightEdges /tmp/tmp.m68Z0dFAYs/graphviz/lib/common/routespl.c:1233
    #5 0x7f4bc24b35f8 in makeStraightEdge /tmp/tmp.m68Z0dFAYs/graphviz/lib/common/routespl.c:1203
    #6 0x7f4bbdf28b52 in _spline_edges /tmp/tmp.m68Z0dFAYs/graphviz/lib/neatogen/neatosplines.c:659
    #7 0x7f4bbdf29240 in splineEdges /tmp/tmp.m68Z0dFAYs/graphviz/lib/neatogen/neatosplines.c:736
    #8 0x7f4bbdf29310 in spline_edges1 /tmp/tmp.m68Z0dFAYs/graphviz/lib/neatogen/neatosplines.c:749
    #9 0x7f4bbdf293be in spline_edges0 /tmp/tmp.m68Z0dFAYs/graphviz/lib/neatogen/neatosplines.c:779
    #10 0x7f4bbdf29bcb in spline_edges /tmp/tmp.m68Z0dFAYs/graphviz/lib/neatogen/neatosplines.c:817
    #11 0x7f4bbdf14ea6 in neato_layout /tmp/tmp.m68Z0dFAYs/graphviz/lib/neatogen/neatoinit.c:1489
    #12 0x7f4bc242b6fc in gvLayoutJobs /tmp/tmp.m68Z0dFAYs/graphviz/lib/gvc/gvlayout.c:85
    #13 0x559fcd474960 in main /tmp/tmp.m68Z0dFAYs/graphviz/cmd/dot/dot.c:132
    #14 0x7f4bc21d709a in __libc_start_main ../csu/libc-start.c:308

find_all_cycles() was calling vec_delete() on the temporary vector it allocated,
but it did not take into account that the nested vectors were not freed by
vec_delete(). This change moves the open coded clean up logic from
get_cycle_centroid() into vec_delete() to fix this and make it less likely that
this is missed in future.

This was initially encountered while investigating #1554.

4 years agorelocate vec_get() so we can call it earlier
Matthew Fernandez [Thu, 25 Jun 2020 02:05:54 +0000 (19:05 -0700)]
relocate vec_get() so we can call it earlier

4 years agomark the parameter to vec_length() as const
Matthew Fernandez [Thu, 25 Jun 2020 01:59:34 +0000 (18:59 -0700)]
mark the parameter to vec_length() as const

4 years agorelocate vec_length() so we can call it earlier
Matthew Fernandez [Thu, 25 Jun 2020 01:58:50 +0000 (18:58 -0700)]
relocate vec_length() so we can call it earlier

4 years agoMerge branch 'F2AA1D9F-EB82-4EB5-8B26-C5765A343AE9' into 'master'
Matthew Fernandez [Tue, 23 Jun 2020 13:44:33 +0000 (13:44 +0000)]
Merge branch 'F2AA1D9F-EB82-4EB5-8B26-C5765A343AE9' into 'master'

exit on allocation failure in lib/common/memory.c wrappers (attempt 2)

See merge request graphviz/graphviz!1436

4 years agofix: remove generated patchwork.1.pdf during distclean
Matthew Fernandez [Tue, 23 Jun 2020 00:12:45 +0000 (17:12 -0700)]
fix: remove generated patchwork.1.pdf during distclean

As discussed on #1734, this omission looks to have been a typo.

4 years agoswap malloc(n*m) pattern for calloc(n,m)
Matthew Fernandez [Tue, 16 Jun 2020 01:04:42 +0000 (18:04 -0700)]
swap malloc(n*m) pattern for calloc(n,m)

This avoids some potential integer overflows.

4 years agoremove some now-redundant error handling from a call to N_NEW
Matthew Fernandez [Tue, 16 Jun 2020 00:57:12 +0000 (17:57 -0700)]
remove some now-redundant error handling from a call to N_NEW

The N_NEW wrapper now exits on allocation failure, rendering this code path
redundant.

4 years agoremove some now-redundant error handling following a call to NEW()
Matthew Fernandez [Tue, 16 Jun 2020 00:05:21 +0000 (17:05 -0700)]
remove some now-redundant error handling following a call to NEW()

Allocation failures in NEW() now cause an error message and exit, so this code
path was redundant.

4 years agoremove allocation failure check in setPrefix
Matthew Fernandez [Mon, 15 Jun 2020 23:23:24 +0000 (16:23 -0700)]
remove allocation failure check in setPrefix

The function being called here, gmalloc, now exits on allocation failure. None
of setPrefix's callers can tolerate failure anyway, so this error handling seems
to have been incomplete previously.

4 years agouse calloc instead of malloc;memset in zmalloc()
Matthew Fernandez [Tue, 2 Jun 2020 03:44:34 +0000 (20:44 -0700)]
use calloc instead of malloc;memset in zmalloc()

This is more efficient for larger allocations, where the allocator can just
provide a zeroed page from the operating system.

4 years agoalso provide a calloc wrapper in lib/common
Matthew Fernandez [Tue, 2 Jun 2020 03:48:54 +0000 (20:48 -0700)]
also provide a calloc wrapper in lib/common

4 years agoremove commented out gmalloc variants
Matthew Fernandez [Tue, 2 Jun 2020 03:41:26 +0000 (20:41 -0700)]
remove commented out gmalloc variants