]> granicus.if.org Git - graphviz/commitdiff
increase stack size on Windows to 32MB
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 1 Jan 2023 02:18:31 +0000 (18:18 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 1 Jan 2023 02:25:12 +0000 (18:25 -0800)
This repairs the long chain test after it was previously inadvertently broken.
Technically going to 32MB is not necessary on all platforms; in release mode,
the MS Build built Graphviz can handle this example with only a 16MB stack. But
it seems simpler to uniformly go to 32MB on all Windows platforms. In a 64-bit
address space, 32MB is trivial and we could even adjust this limit higher in
future. Note that this is the reserved size, not the committed size.

Gitlab: #1710

CHANGELOG.md
cmd/dot/CMakeLists.txt
cmd/dot/dot.vcxproj
tests/regression_tests/large/test_large_graphs.py

index 85eae01f47bc9a82958a175d14fddae5f7e25999..be55ee0d9fb3ac52c1b29a4c9a8d65346aabe3d7 100644 (file)
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
   `--enable-python` is now an alias for `--enable-python3`.
 - The CMake build system, when building `gvedit`, will now look for and use Qt6
   in preference over Qt5. #2233
+- Reserved stack size on Windows for the `dot.exe` binary has been increased
+  from ~3.8MB to 32MB. #1710
 
 ### Fixed
 
index e1f8c883a98195b967d4c6099b823ea26b4fe9fc..b4fdac874cb752e79cf5ef17f3574cfc36a02408 100644 (file)
@@ -21,6 +21,12 @@ target_link_libraries(dot
   gvc
 )
 
+if(MINGW)
+  set_target_properties(dot PROPERTIES LINK_FLAGS -Wl,--stack,0x2000000)
+elseif(WIN32)
+  set_target_properties(dot PROPERTIES LINK_FLAGS /STACK:"33554432")
+endif()
+
 # Installation location of executables
 install(
   TARGETS dot
index bbfbe4d2ef626da061102ba1da65d47bd60a3d15..af0797c2ebc8be1746b91ed9b7009b5ccf6fde0b 100644 (file)
@@ -68,7 +68,7 @@
       <DataExecutionPrevention />
       <TargetMachine>MachineX86</TargetMachine>
       <AdditionalDependencies>cgraph.lib;gvc.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <StackReserveSize>4000000</StackReserveSize>
+      <StackReserveSize>33554432</StackReserveSize>
     </Link>
     <PostBuildEvent>
       <Command>$(OutDir)dot -c
@@ -99,7 +99,7 @@ copy /B /Y $(OutDir)dot.exe $(OutDir)twopi.exe</Command>
       <DataExecutionPrevention />
       <TargetMachine>MachineX86</TargetMachine>
       <AdditionalDependencies>cgraph.lib;gvc.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <StackReserveSize>4000000</StackReserveSize>
+      <StackReserveSize>33554432</StackReserveSize>
     </Link>
     <PostBuildEvent>
       <Command>$(OutDir)dot -c
index d0dbeb99524a746b4a97d8343786d40e696d31cb..c6dc579fd9803f9c6c749e0131bdd924db1d206c 100644 (file)
@@ -12,7 +12,7 @@ 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() in ("Darwin", "Windows"),
+@pytest.mark.xfail(platform.system() == "Darwin",
                    reason="https://gitlab.com/graphviz/graphviz/-/issues/1710")
 def test_long_chain():
   """