The jit may try to inline in cases where there are serious mismatches between the type the caller is passing and the type the callee expects. This can cause the jit to issue malformed queries through the jit interface.
The jit may try to inline in cases where there are serious mismatches between the type the caller is passing and the type the callee expects. This can cause the jit to issue malformed queries through the jit interface.

The fix is to take an existing assertion check which detects mismatches the jit is not prepared to handle and make the check active in retail builds. If a bad type mismatch is detected, inlining at that call site is aborted.

[tfs-changeset: 1569969]

andschwa/coreclr,JosephTremoulet/coreclr,Lucrecious/coreclr,josteink/coreclr,yizhang82/coreclr,wtgodbe/coreclr,alexperovich/coreclr,yeaicc/coreclr,swgillespie/coreclr,kyulee1/coreclr,tijoytom/coreclr,ramarag/coreclr,wkchoy74/coreclr,neurospeech/coreclr,hseok-oh/coreclr,martinwoodward/coreclr,kyulee1/coreclr,Godin/coreclr,alexperovich/coreclr,roncain/coreclr,vinnyrom/coreclr,cmckinsey/coreclr,pgavlin/coreclr,parjong/coreclr,sagood/coreclr,botaberg/coreclr,andschwa/coreclr,ZhichengZhu/coreclr,kyulee1/coreclr,schellap/coreclr,benpye/coreclr,josteink/coreclr,wateret/coreclr,mokchhya/coreclr,bartonjs/coreclr,AlexGhiondea/coreclr,chuck-mitchell/coreclr,cshung/coreclr,wkchoy74/coreclr,dasMulli/coreclr,manu-silicon/coreclr,andschwa/coreclr,cshung/coreclr,jhendrixMSFT/coreclr,tijoytom/coreclr,krytarowski/coreclr,russellhadley/coreclr,mokchhya/coreclr,KrzysztofCwalina/coreclr,qiudesong/coreclr,Dmitry-Me/coreclr,bartdesmet/coreclr,parjong/coreclr,cmckinsey/coreclr,shahid-pk/coreclr,alexperovich/coreclr,pgavlin/coreclr,manu-silicon/coreclr,wkchoy74/coreclr,naamunds/coreclr,JonHanna/coreclr,ramarag/coreclr,sagood/coreclr,rartemev/coreclr,Dmitry-Me/coreclr,tijoytom/coreclr,andschwa/coreclr,jamesqo/coreclr,dasMulli/coreclr,sjsinju/coreclr,mskvortsov/coreclr,LLITCHEV/coreclr,Lucrecious/coreclr,JosephTremoulet/coreclr,ruben-ayrapetyan/coreclr,cmckinsey/coreclr,neurospeech/coreclr,swgillespie/coreclr,bartdesmet/coreclr,benpye/coreclr,rartemev/coreclr,cmckinsey/coreclr,YongseopKim/coreclr,James-Ko/coreclr,KrzysztofCwalina/coreclr,sjsinju/coreclr,jamesqo/coreclr,cydhaselton/coreclr,naamunds/coreclr,parjong/coreclr,James-Ko/coreclr,dasMulli/coreclr,ramarag/coreclr,wateret/coreclr,kyulee1/coreclr,mskvortsov/coreclr,hseok-oh/coreclr,tijoytom/coreclr,sperling/coreclr,parjong/coreclr,ruben-ayrapetyan/coreclr,roncain/coreclr,dpodder/coreclr,mokchhya/coreclr,JonHanna/coreclr,shahid-pk/coreclr,KrzysztofCwalina/coreclr,roncain/coreclr,mocsy/coreclr,hseok-oh/coreclr,schellap/coreclr,kyulee1/coreclr,neurospeech/coreclr,ruben-ayrapetyan/coreclr,mokchhya/coreclr,naamunds/coreclr,mocsy/coreclr,mocsy/coreclr,JosephTremoulet/coreclr,russellhadley/coreclr,rartemev/coreclr,benpye/coreclr,mocsy/coreclr,AlexGhiondea/coreclr,sperling/coreclr,rartemev/coreclr,cydhaselton/coreclr,martinwoodward/coreclr,SlavaRa/coreclr,YongseopKim/coreclr,mskvortsov/coreclr,mokchhya/coreclr,roncain/coreclr,jhendrixMSFT/coreclr,swgillespie/coreclr,yeaicc/coreclr,botaberg/coreclr,neurospeech/coreclr,vinnyrom/coreclr,dpodder/coreclr,wtgodbe/coreclr,SlavaRa/coreclr,Lucrecious/coreclr,botaberg/coreclr,swgillespie/coreclr,cydhaselton/coreclr,naamunds/coreclr,rartemev/coreclr,wtgodbe/coreclr,cshung/coreclr,manu-silicon/coreclr,Dmitry-Me/coreclr,qiudesong/coreclr,wateret/coreclr,wkchoy74/coreclr,James-Ko/coreclr,James-Ko/coreclr,bartonjs/coreclr,AlexGhiondea/coreclr,dpodder/coreclr,sperling/coreclr,vinnyrom/coreclr,ragmani/coreclr,gkhanna79/coreclr,cydhaselton/coreclr,YongseopKim/coreclr,russellhadley/coreclr,Lucrecious/coreclr,wkchoy74/coreclr,roncain/coreclr,vinnyrom/coreclr,jhendrixMSFT/coreclr,Dmitry-Me/coreclr,benpye/coreclr,sjsinju/coreclr,bartdesmet/coreclr,AlexGhiondea/coreclr,rartemev/coreclr,mmitche/coreclr,KrzysztofCwalina/coreclr,gkhanna79/coreclr,bartdesmet/coreclr,bartonjs/coreclr,sejongoh/coreclr,russellhadley/coreclr,cshung/coreclr,James-Ko/coreclr,ruben-ayrapetyan/coreclr,mmitche/coreclr,Godin/coreclr,LLITCHEV/coreclr,mocsy/coreclr,ZhichengZhu/coreclr,poizan42/coreclr,JosephTremoulet/coreclr,jhendrixMSFT/coreclr,krytarowski/coreclr,roncain/coreclr,sejongoh/coreclr,bartdesmet/coreclr,chuck-mitchell/coreclr,sjsinju/coreclr,mmitche/coreclr,swgillespie/coreclr,ZhichengZhu/coreclr,vinnyrom/coreclr,martinwoodward/coreclr,swgillespie/coreclr,hseok-oh/coreclr,botaberg/coreclr,wtgodbe/coreclr,hseok-oh/coreclr,yeaicc/coreclr,sperling/coreclr,jamesqo/coreclr,ZhichengZhu/coreclr,AlexGhiondea/coreclr,wkchoy74/coreclr,cshung/coreclr,krytarowski/coreclr,mmitche/coreclr,dasMulli/coreclr,pgavlin/coreclr,hseok-oh/coreclr,roncain/coreclr,andschwa/coreclr,gkhanna79/coreclr,gkhanna79/coreclr,mocsy/coreclr,martinwoodward/coreclr,naamunds/coreclr,ragmani/coreclr,botaberg/coreclr,LLITCHEV/coreclr,russellhadley/coreclr,mskvortsov/coreclr,JonHanna/coreclr,qiudesong/coreclr,sperling/coreclr,qiudesong/coreclr,poizan42/coreclr,cydhaselton/coreclr,Dmitry-Me/coreclr,yizhang82/coreclr,andschwa/coreclr,benpye/coreclr,ramarag/coreclr,mocsy/coreclr,schellap/coreclr,yeaicc/coreclr,russellhadley/coreclr,dasMulli/coreclr,poizan42/coreclr,josteink/coreclr,gkhanna79/coreclr,JonHanna/coreclr,ZhichengZhu/coreclr,ruben-ayrapetyan/coreclr,vinnyrom/coreclr,JosephTremoulet/coreclr,SlavaRa/coreclr,josteink/coreclr,sperling/coreclr,YongseopKim/coreclr,Godin/coreclr,bartdesmet/coreclr,neurospeech/coreclr,parjong/coreclr,SlavaRa/coreclr,chuck-mitchell/coreclr,ZhichengZhu/coreclr,chuck-mitchell/coreclr,Dmitry-Me/coreclr,pgavlin/coreclr,ramarag/coreclr,yizhang82/coreclr,Dmitry-Me/coreclr,wkchoy74/coreclr,wateret/coreclr,JonHanna/coreclr,Godin/coreclr,tijoytom/coreclr,martinwoodward/coreclr,LLITCHEV/coreclr,manu-silicon/coreclr,jhendrixMSFT/coreclr,ragmani/coreclr,James-Ko/coreclr,schellap/coreclr,mmitche/coreclr,jhendrixMSFT/coreclr,swgillespie/coreclr,bartonjs/coreclr,cydhaselton/coreclr,SlavaRa/coreclr,SlavaRa/coreclr,sagood/coreclr,poizan42/coreclr,sagood/coreclr,Godin/coreclr,shahid-pk/coreclr,josteink/coreclr,shahid-pk/coreclr,krk/coreclr,martinwoodward/coreclr,alexperovich/coreclr,bartdesmet/coreclr,pgavlin/coreclr,ramarag/coreclr,chuck-mitchell/coreclr,chuck-mitchell/coreclr,sperling/coreclr,Lucrecious/coreclr,JosephTremoulet/coreclr,sejongoh/coreclr,Lucrecious/coreclr,mmitche/coreclr,benpye/coreclr,krytarowski/coreclr,neurospeech/coreclr,jamesqo/coreclr,chuck-mitchell/coreclr,parjong/coreclr,poizan42/coreclr,shahid-pk/coreclr,ruben-ayrapetyan/coreclr,cmckinsey/coreclr,bartonjs/coreclr,YongseopKim/coreclr,LLITCHEV/coreclr,sagood/coreclr,manu-silicon/coreclr,bartonjs/coreclr,JonHanna/coreclr,wateret/coreclr,josteink/coreclr,vinnyrom/coreclr,qiudesong/coreclr,LLITCHEV/coreclr,jamesqo/coreclr,schellap/coreclr,mskvortsov/coreclr,kyulee1/coreclr,mokchhya/coreclr,botaberg/coreclr,naamunds/coreclr,tijoytom/coreclr,andschwa/coreclr,shahid-pk/coreclr,yeaicc/coreclr,krytarowski/coreclr,krk/coreclr,jhendrixMSFT/coreclr,wateret/coreclr,sejongoh/coreclr,mskvortsov/coreclr,sejongoh/coreclr,yizhang82/coreclr,cshung/coreclr,sjsinju/coreclr,yizhang82/coreclr,shahid-pk/coreclr,dpodder/coreclr,ragmani/coreclr,josteink/coreclr,gkhanna79/coreclr,bartonjs/coreclr,schellap/coreclr,dpodder/coreclr,poizan42/coreclr,dpodder/coreclr,sagood/coreclr,ragmani/coreclr,AlexGhiondea/coreclr,manu-silicon/coreclr,sejongoh/coreclr,YongseopKim/coreclr,manu-silicon/coreclr,yizhang82/coreclr,Godin/coreclr,alexperovich/coreclr,naamunds/coreclr,krk/coreclr,KrzysztofCwalina/coreclr,sejongoh/coreclr,qiudesong/coreclr,martinwoodward/coreclr,Lucrecious/coreclr,KrzysztofCwalina/coreclr,ragmani/coreclr,krk/coreclr,benpye/coreclr,schellap/coreclr,cmckinsey/coreclr,sjsinju/coreclr,jamesqo/coreclr,Godin/coreclr,yeaicc/coreclr,ZhichengZhu/coreclr,ramarag/coreclr,alexperovich/coreclr,LLITCHEV/coreclr,wtgodbe/coreclr,wtgodbe/coreclr,krk/coreclr,yeaicc/coreclr,dasMulli/coreclr,KrzysztofCwalina/coreclr,pgavlin/coreclr,krk/coreclr,cmckinsey/coreclr,dasMulli/coreclr,mokchhya/coreclr,krytarowski/coreclr