From 6286a9708ea3611a08b507e8a654553e6317b232 Mon Sep 17 00:00:00 2001 From: Scott Schurr Date: Tue, 23 Jan 2018 13:19:50 -0800 Subject: [PATCH] Avoid stack overflow on AppVeyor: o Reduce json_reader max recursion, and o Use a GCE VM for AppVeyor --- appveyor.yml | 9 +++++++-- src/ripple/json/json_reader.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9e3b40490d..5a1aeb9f6e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,7 +4,7 @@ environment: # We bundle up protoc.exe and only the parts of boost and openssl we need so # that it's a small download. We also use appveyor's free cache, avoiding fees - # downloading from S3 each time. + # downloading from S3 each time. # TODO: script to create this package. RIPPLED_DEPS_PATH: rippled_deps17.02 RIPPLED_DEPS_URL: https://ripple.github.io/Downloads/appveyor/%RIPPLED_DEPS_PATH%.zip @@ -21,6 +21,11 @@ environment: BOOST_ROOT: C:/%RIPPLED_DEPS_PATH%/boost OPENSSL_ROOT: C:/%RIPPLED_DEPS_PATH%/openssl + # We've had trouble with AppVeyor apparently not having a stack as large + # as the *nix CI platforms. AppVeyor support suggested that we try + # GCE VMs. The following line is supposed to enable that VM type. + appveyor_build_worker_cloud: gce + matrix: # This build works, but our current Appveyor config runs matrix builds # sequentially, and the one build is already slow enough. @@ -127,7 +132,7 @@ test_script: - ps: | & { # Run the rippled unit tests - & $exe --unittest --quiet --unittest-log + & $exe --unittest --unittest-log # https://connect.microsoft.com/PowerShell/feedback/details/751703/option-to-stop-script-if-command-line-exe-fails if ($LastExitCode -ne 0) { throw "Unit tests failed" } } diff --git a/src/ripple/json/json_reader.h b/src/ripple/json/json_reader.h index 6e08e82b3b..4129b5f559 100644 --- a/src/ripple/json/json_reader.h +++ b/src/ripple/json/json_reader.h @@ -81,7 +81,7 @@ public: */ std::string getFormatedErrorMessages () const; - static constexpr unsigned nest_limit {1000}; + static constexpr unsigned nest_limit {25}; private: enum TokenType