Revision: 949
http://www.exim.org/viewvc/pcre2?view=rev&revision=949
Author: ph10
Date: 2018-06-27 17:34:06 +0100 (Wed, 27 Jun 2018)
Log Message:
-----------
Increase stack size when linking pcre2test with MSVC.
Modified Paths:
--------------
code/trunk/CMakeLists.txt
code/trunk/ChangeLog
Modified: code/trunk/CMakeLists.txt
===================================================================
--- code/trunk/CMakeLists.txt 2018-06-22 16:29:56 UTC (rev 948)
+++ code/trunk/CMakeLists.txt 2018-06-27 16:34:06 UTC (rev 949)
@@ -81,6 +81,7 @@
# 2017-04-08 PH added HEAP_LIMIT
# 2017-06-15 ZH added SUPPORT_JIT_SEALLOC support
# 2018-06-19 PH added checks for stdint.h and inttypes.h
+# 2018-06-27 PH added Daniel's patch to increase the stack for MSVC
PROJECT(PCRE2 C)
@@ -607,6 +608,13 @@
SET(PCRE2TEST_SOURCES src/pcre2test.c)
+ IF(MSVC)
+ # This is needed to avoid a stack overflow error in the standard tests. The
+ # flag should be indicated with a forward-slash instead of a hyphen, but
+ # then CMake treats it as a file path.
+ SET(PCRE2TEST_LINKER_FLAGS -STACK:2500000)
+ ENDIF(MSVC)
+
ADD_EXECUTABLE(pcre2test ${PCRE2TEST_SOURCES})
SET(targets ${targets} pcre2test)
IF(PCRE2_BUILD_PCRE2_8)
@@ -618,7 +626,7 @@
IF(PCRE2_BUILD_PCRE2_32)
LIST(APPEND PCRE2TEST_LIBS pcre2-32)
ENDIF(PCRE2_BUILD_PCRE2_32)
- TARGET_LINK_LIBRARIES(pcre2test ${PCRE2TEST_LIBS})
+ TARGET_LINK_LIBRARIES(pcre2test ${PCRE2TEST_LIBS} ${PCRE2TEST_LINKER_FLAGS})
IF(PCRE2_SUPPORT_JIT)
ADD_EXECUTABLE(pcre2_jit_test src/pcre2_jit_test.c)
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2018-06-22 16:29:56 UTC (rev 948)
+++ code/trunk/ChangeLog 2018-06-27 16:34:06 UTC (rev 949)
@@ -86,6 +86,10 @@
these now, if using MSVC or a standard C before C99, %lu is used with a
cast if necessary.
+19. Applied a contributed patch to CMakeLists.txt to increase the stack size
+when linking pcre2test with MSVC. This gets rid of a stack overflow error in
+the standard set of tests.
+
Version 10.31 12-February-2018
------------------------------