diff options
author | Koundinya Veluri <kouvel@users.noreply.github.com> | 2018-09-19 03:30:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-19 03:30:01 -0700 |
commit | 2b698ce9bd72368f9722524573e4a77a24131700 (patch) | |
tree | 31ddcf9bc24292d9fbf3d03247ae2428f9f136a0 /src | |
parent | 291e365452da11122ccfbbdef75abd97a76c1f25 (diff) | |
download | coreclr-2b698ce9bd72368f9722524573e4a77a24131700.tar.gz coreclr-2b698ce9bd72368f9722524573e4a77a24131700.tar.bz2 coreclr-2b698ce9bd72368f9722524573e4a77a24131700.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/vm/precode.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |