diff --git a/src/coreclr/jit/emit.cpp b/src/coreclr/jit/emit.cpp index e04ce885e2279..ba4ab8f7b6caa 100644 --- a/src/coreclr/jit/emit.cpp +++ b/src/coreclr/jit/emit.cpp @@ -6413,7 +6413,8 @@ unsigned emitter::emitEndCodeGen(Compiler* comp, size_t curInstrAddr = (size_t)cp; instrDesc* curInstrDesc = id; - if ((emitComp->opts.disAsm || emitComp->verbose) && (JitConfig.JitDisasmWithDebugInfo() != 0)) + if ((emitComp->opts.disAsm || emitComp->verbose) && (JitConfig.JitDisasmWithDebugInfo() != 0) && + (id->idCodeSize() > 0)) { UNATIVE_OFFSET curCodeOffs = emitCurCodeOffs(cp); while (nextMapping != emitComp->genPreciseIPmappings.end())