summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Forstall <brucefo@microsoft.com>2015-11-17 14:00:20 -0800
committerBruce Forstall <brucefo@microsoft.com>2015-11-17 14:00:20 -0800
commitc1bf3a266cf1c588adc5e96b2524e67bae930937 (patch)
tree5b7669b583f679dce6c0d995f7841006e1a63066
parent82c27bcb62cb03ea0d7883689bd8611fe5444d70 (diff)
downloadcoreclr-c1bf3a266cf1c588adc5e96b2524e67bae930937.tar.gz
coreclr-c1bf3a266cf1c588adc5e96b2524e67bae930937.tar.bz2
coreclr-c1bf3a266cf1c588adc5e96b2524e67bae930937.zip
Fix RyuJIT assert 'emitCurIG != emitPrologIG'
This occurs when the call-to-finally block exists as the last code in the function (including any funclets). After we generate all "normal" code, we start over and generate code for all the prologs and epilogs. In this case, we didn't reset the emitForceNewIG global, which determines if we should force a new IG to be created the next time code is generated. It is used for specifying no-GC regions. This fix initializes it (along with emitNOGCIG) at the beginning of generating and prolog or epilog.
-rw-r--r--src/jit/emit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jit/emit.cpp b/src/jit/emit.cpp
index fa9d3597de..e327657af5 100644
--- a/src/jit/emit.cpp
+++ b/src/jit/emit.cpp
@@ -1498,6 +1498,7 @@ void emitter::emitBegProlog()
#endif
emitNoGCIG = true;
+ emitForceNewIG = false;
/* Switch to the pre-allocated prolog IG */
@@ -1909,6 +1910,7 @@ void emitter::emitBegPrologEpilog(insGroup* igPh)
igPh->igFlags &= ~IGF_PLACEHOLDER;
emitNoGCIG = true;
+ emitForceNewIG = false;
/* Set up the GC info that we stored in the placeholder */
@@ -3216,7 +3218,7 @@ void emitter::emitDispIG(insGroup* ig, insGroup* igPrev, bool ver
printf("IG%02u ", igPh->igPhData->igPhNext->igNum);
else
printf("<END>");
- printf(", BB=%08XH", dspPtr(igPh->igPhData->igPhBB));
+ printf(", BB=%08XH (BB%02u)", dspPtr(igPh->igPhData->igPhBB), (igPh->igPhData->igPhBB != nullptr) ? igPh->igPhData->igPhBB->bbNum : 0 );
emitDispIGflags(igPh->igFlags);