From 663e7b4aad00c34bbb9a98310a56433160682078 Mon Sep 17 00:00:00 2001 From: Jakob Botsch Nielsen Date: Tue, 30 Nov 2021 11:27:42 +0100 Subject: [PATCH] Avoid printing debug info on 0 byte instructions (#62077) In particular do not attach it to INS_align that do not end up producing any code. --- src/coreclr/jit/emit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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())