On Thu, 3 Nov 2022, Alvin Wong via Mingw-w64-public wrote:
Make __chk_fail use FAST_FAIL_RANGE_CHECK_FAILURE instead of FAST_FAIL_STACK_COOKIE_CHECK_FAILURE to distinguish from __stack_chk_fail. Signed-off-by: Alvin Wong <[email protected]> --- mingw-w64-crt/ssp/chk_fail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-crt/ssp/chk_fail.c b/mingw-w64-crt/ssp/chk_fail.c index b77213904..b577219a8 100644 --- a/mingw-w64-crt/ssp/chk_fail.c +++ b/mingw-w64-crt/ssp/chk_fail.c @@ -15,7 +15,7 @@ void __cdecl __attribute__((__noreturn__)) __chk_fail(void) { static const char msg[] = "*** buffer overflow detected ***: terminated\n"; write(STDERR_FILENO, msg, strlen(msg)); if (IsProcessorFeaturePresent(PF_FASTFAIL_AVAILABLE)) { - __fastfail(FAST_FAIL_STACK_COOKIE_CHECK_FAILURE); + __fastfail(FAST_FAIL_RANGE_CHECK_FAILURE); } else { TerminateProcess(GetCurrentProcess(), STATUS_STACK_BUFFER_OVERRUN); __builtin_unreachable(); -- 2.37.1
LGTM, this looks reasonable to me, thanks! I'll push this after leaving some time for others to comment.
// Martin _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
