MCPcopy Create free account
hub / github.com/SOCI/soci / FatalConditionHandler

Method FatalConditionHandler

tests/catch.hpp:10826–10835  ·  view source on GitHub ↗

For MSVC, we reserve part of the stack memory for handling memory overflow structured exception.

Source from the content-addressed store, hash-verified

10824 // For MSVC, we reserve part of the stack memory for handling
10825 // memory overflow structured exception.
10826 FatalConditionHandler::FatalConditionHandler() {
10827 ULONG guaranteeSize = static_cast<ULONG>(minStackSizeForErrors);
10828 if (!SetThreadStackGuarantee(&guaranteeSize)) {
10829 // We do not want to fully error out, because needing
10830 // the stack reserve should be rare enough anyway.
10831 Catch::cerr()
10832 << "Failed to reserve piece of stack."
10833 << " Stack overflows will not be reported successfully.";
10834 }
10835 }
10836
10837 // We do not attempt to unset the stack guarantee, because
10838 // Windows does not support lowering the stack size guarantee.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected