For MSVC, we reserve part of the stack memory for handling memory overflow structured exception.
| 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. |
nothing calls this directly
no outgoing calls
no test coverage detected