From: Koundinya Veluri Date: Wed, 19 Sep 2018 10:30:01 +0000 (-0700) Subject: Replace assert in Precode::SetTargetInterlocked (#20007) X-Git-Tag: accepted/tizen/unified/20190422.045933~1190 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b698ce9bd72368f9722524573e4a77a24131700;p=platform%2Fupstream%2Fcoreclr.git 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 --- diff --git a/src/vm/precode.cpp b/src/vm/precode.cpp index e47e7a7..7b4c1de 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; }