Skip to content

Commit 5c476b2

Browse files
committed
Increase stack size for MSVC
Fix #2547
1 parent d6dfcb1 commit 5c476b2

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,10 @@ if (MSVC)
422422
target_compile_definitions(libsouffle PUBLIC USE_CUSTOM_GETOPTLONG)
423423
target_compile_definitions(compiled PUBLIC USE_CUSTOM_GETOPTLONG)
424424
target_compile_definitions(souffleprof PUBLIC USE_CUSTOM_GETOPTLONG)
425+
426+
# 4MB stack size
427+
target_link_options(souffle PRIVATE "/STACK:24194304")
428+
target_link_options(libsouffle PRIVATE "/STACK:24194304")
425429
endif (MSVC)
426430

427431
if (APPLE)

tests/evaluation/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,7 @@ positive_test(magic_movies)
102102
positive_test(magic_names1)
103103
positive_test(magic_neglabel)
104104
positive_test(magic_negignored)
105-
if (NOT (MSVC AND (CMAKE_BUILD_TYPE MATCHES Debug)))
106-
# When compiled in Debug with Visual Studio with the default stack size of 1MB,
107-
# the interpreter fails with a stack overflow in Engine::execute().
108-
# The cause is the number of lambda functions that are allocated as locals on the stack.
109-
# The stack frame of Engine::execute is close to 30KB.
110-
# The 1MB stack will overflow at depth ~34 of Engine::execute().
111105
positive_test(magic_nqueens)
112-
endif ()
113106
positive_test(magic_perfect_numbers)
114107
positive_test(magic_posignored)
115108
positive_test(magic_poslabel)

0 commit comments

Comments
 (0)