···11+/*
22+ * PROJECT: ReactOS vcruntime library
33+ * LICENSE: MIT (https://spdx.org/licenses/MIT)
44+ * PURPOSE: Implementation of _chkesp_failed
55+ * COPYRIGHT: Copyright 2026 Timo Kreuzer <timo.kreuzer@reactos.org>
66+ */
77+88+#include <crtdbg.h>
99+1010+void _chkesp_failed(void)
1111+{
1212+#ifdef _DEBUG
1313+ /* Report the error to the user */
1414+ _CrtDbgReport(_CRT_ERROR,
1515+ __FILE__,
1616+ __LINE__,
1717+ "",
1818+ "The stack pointer was invalid after a function call. "
1919+ "This indicates that a function was called with the "
2020+ "wrong parmeters or calling convention.\n"
2121+ "Click 'Retry' to debug the application.");
2222+#endif
2323+2424+ __debugbreak();
2525+}