diff --git a/src/coreclr/jit/emit.cpp b/src/coreclr/jit/emit.cpp index c44cf8aa2cfe66..36dbf617a70f86 100644 --- a/src/coreclr/jit/emit.cpp +++ b/src/coreclr/jit/emit.cpp @@ -3936,7 +3936,7 @@ void emitter::emitDispCommentForHandle(size_t handle, GenTreeFlags flag) // NOTE: eGetCPString always returns nullptr on Linux/ARM if (wstr == nullptr) { - printf("%s string handle", commentPrefix); + str = "string handle"; } else { diff --git a/src/coreclr/jit/emitxarch.cpp b/src/coreclr/jit/emitxarch.cpp index af60794c9490af..dc55403d6dcf30 100644 --- a/src/coreclr/jit/emitxarch.cpp +++ b/src/coreclr/jit/emitxarch.cpp @@ -8851,6 +8851,7 @@ void emitter::emitDispIns( else { PRINT_CONSTANT: + ssize_t srcVal = val; // Munge any pointers if we want diff-able disassembly if (emitComp->opts.disDiffable) { @@ -8872,8 +8873,7 @@ void emitter::emitDispIns( { // (val < 0) printf("-0x%IX", -val); } - - emitDispCommentForHandle(val, id->idDebugOnlyInfo()->idFlags & GTF_ICON_HDL_MASK); + emitDispCommentForHandle(srcVal, id->idDebugOnlyInfo()->idFlags & GTF_ICON_HDL_MASK); } break;