From f7cd0c6b5cc315b1a3105565ecceca5eb656c1bb Mon Sep 17 00:00:00 2001 From: Vladimir Sadov Date: Tue, 17 Aug 2021 10:21:27 -0700 Subject: [PATCH] commenting out an assert that could be triggered on Win7 (#57524) --- src/coreclr/vm/threadsuspend.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/coreclr/vm/threadsuspend.cpp b/src/coreclr/vm/threadsuspend.cpp index 8359706..57318e2 100644 --- a/src/coreclr/vm/threadsuspend.cpp +++ b/src/coreclr/vm/threadsuspend.cpp @@ -1985,7 +1985,9 @@ CONTEXT* AllocateOSContextHelper(BYTE** contextBuffer) pfnInitializeContext2(NULL, context, NULL, &contextSize, xStateCompactionMask) : InitializeContext(NULL, context, NULL, &contextSize); - _ASSERTE(!success && GetLastError() == ERROR_INSUFFICIENT_BUFFER); + // The following assert is valid, but gets triggered in some Win7 runs with no impact on functionality. + // commenting this out to reduce noise, as long as Win7 is supported. + // _ASSERTE(!success && GetLastError() == ERROR_INSUFFICIENT_BUFFER); // So now allocate a buffer of that size and call InitializeContext again BYTE* buffer = new (nothrow)BYTE[contextSize]; -- 2.7.4