aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/asm_amd64.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/asm_amd64.s')
-rw-r--r--src/runtime/asm_amd64.s4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/asm_amd64.s b/src/runtime/asm_amd64.s
index 1071d270c1..cb21629a84 100644
--- a/src/runtime/asm_amd64.s
+++ b/src/runtime/asm_amd64.s
@@ -456,6 +456,10 @@ goodm:
PUSHQ AX // open up space for fn's arg spill slot
MOVQ 0(DX), R12
CALL R12 // fn(g)
+ // The Windows native stack unwinder incorrectly classifies the next instruction
+ // as part of the function epilogue, producing a wrong call stack.
+ // Add a NOP to work around this issue. See go.dev/issue/67007.
+ BYTE $0x90
POPQ AX
JMP runtime·badmcall2(SB)
RET