Skip to content

Commit

Permalink
add asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
VSadov committed Jun 18, 2024
1 parent 7b4feaf commit 57591c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/coreclr/jit/emitinl.h
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,11 @@ bool emitter::emitGenNoGCLst(Callback& cb)
{
for (insGroup* ig = emitIGlist; ig; ig = ig->igNext)
{
if (ig->igFlags & IGF_NOGCINTERRUPT)
if ((ig->igFlags & IGF_NOGCINTERRUPT) && ig->igSize > 0)
{
emitter::instrDesc* id = emitFirstInstrDesc(ig->igData);
assert(id != nullptr);
assert(id->idCodeSize() > 0);
if (!cb(ig->igFuncIdx, ig->igOffs, ig->igSize, id->idCodeSize(),
ig->igFlags & (IGF_FUNCLET_PROLOG | IGF_FUNCLET_EPILOG | IGF_EPILOG)))
{
Expand Down

0 comments on commit 57591c8

Please sign in to comment.