From 2b698ce9bd72368f9722524573e4a77a24131700 Mon Sep 17 00:00:00 2001 From: Koundinya Veluri Date: Wed, 19 Sep 2018 03:30:01 -0700 Subject: Replace assert in Precode::SetTargetInterlocked (#20007) Fixes https://github.com/dotnet/coreclr/issues/19954 - `SetTargetInterlocked` can be soon followed by `ResetTargetInterlocked`, so the assert at the end of `SetTargetInterlocked` is invalid - Removed the assert and instead just verified that the specified target is not the default prestub target --- src/vm/precode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vm') diff --git a/src/vm/precode.cpp b/src/vm/precode.cpp index e47e7a7f74..7b4c1de516 100644 --- a/src/vm/precode.cpp +++ b/src/vm/precode.cpp @@ -456,6 +456,7 @@ void Precode::ResetTargetInterlocked() BOOL Precode::SetTargetInterlocked(PCODE target, BOOL fOnlyRedirectFromPrestub) { WRAPPER_NO_CONTRACT; + _ASSERTE(!IsPointingToPrestub(target)); PCODE expected = GetTarget(); BOOL ret = FALSE; @@ -498,7 +499,6 @@ BOOL Precode::SetTargetInterlocked(PCODE target, BOOL fOnlyRedirectFromPrestub) // Although executable code is modified on x86/x64, a FlushInstructionCache() is not necessary on those platforms due to the // interlocked operation above (see ClrFlushInstructionCache()) - _ASSERTE(!IsPointingToPrestub()); return ret; } -- cgit v1.2.3