From 0dbc370e123c68ea72da8ee2661d5e79a220007f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 31 Dec 2022 18:22:43 -0800 Subject: [PATCH] increase stack size on macOS to 32MB Similar to the prior situation with Windows platforms, the CMake build on macOS was failing the long chain test due to insufficient stack reservation. This change applies the same increase there. Note that there is no need to adjust the Autotools build, which seems to handle this test case fine on all platforms. Gitlab: closes #1710 --- CHANGELOG.md | 2 ++ cmd/dot/CMakeLists.txt | 4 +++- tests/regression_tests/large/test_large_graphs.py | 4 ---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be55ee0d9..1be153c54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 in preference over Qt5. #2233 - Reserved stack size on Windows for the `dot.exe` binary has been increased from ~3.8MB to 32MB. #1710 +- Reserved stack size on macOS for the `dot` binary when built with CMake has + been increased from 8MB to 32MB. #1710 ### Fixed diff --git a/cmd/dot/CMakeLists.txt b/cmd/dot/CMakeLists.txt index b4fdac874..cef5a8882 100644 --- a/cmd/dot/CMakeLists.txt +++ b/cmd/dot/CMakeLists.txt @@ -21,7 +21,9 @@ target_link_libraries(dot gvc ) -if(MINGW) +if(APPLE) + set_target_properties(dot PROPERTIES LINK_FLAGS -Wl,-stack_size,0x2000000) +elseif(MINGW) set_target_properties(dot PROPERTIES LINK_FLAGS -Wl,--stack,0x2000000) elseif(WIN32) set_target_properties(dot PROPERTIES LINK_FLAGS /STACK:"33554432") diff --git a/tests/regression_tests/large/test_large_graphs.py b/tests/regression_tests/large/test_large_graphs.py index c6dc579fd..c5fe5dc56 100644 --- a/tests/regression_tests/large/test_large_graphs.py +++ b/tests/regression_tests/large/test_large_graphs.py @@ -4,16 +4,12 @@ Tests of large and/or expensive graphs. import os from pathlib import Path -import platform import subprocess import sys -import pytest sys.path.append(os.path.join(os.path.dirname(__file__), "../../../tests")) from gvtest import dot #pylint: disable=wrong-import-position -@pytest.mark.xfail(platform.system() == "Darwin", - reason="https://gitlab.com/graphviz/graphviz/-/issues/1710") def test_long_chain(): """ This test will fail on 32bit Windows machine if compiled with stack size < 16MB. -- 2.50.1