r/golang • u/zhenghaoz • 1h ago
discussion GPT 6 refused to reproduce Go assembly bug, but other models could
Consider the following example that adds two numbers and returns the result:
TEXT ·add(SB), $0-24
MOVD a+0(FP), R0
MOVD b+8(FP), R1
WORD $0xd10043ff // subsp, sp, #16
WORD $0xf90007e0 // strx0, [sp, #8]
WORD $0xf90003e1 // strx1, [sp]
WORD $0xf94007e8 // ldrx8, [sp, #8]
WORD $0xf94003e9 // ldrx9, [sp]
WORD $0x8b090100 // addx0, x8, x9
WORD $0x910043ff // addsp, sp, #16
MOVD R0, result+16(FP)
RET$-24 denotes the total size of arguments and return values. But the stack frame size was a wrong value 0. When the Go runtime performs stack unwinding—such as with runtime/trace's FlightRecorder—the mismatch between the declared frame size and actual stack usage can trigger a runtime crash.
When I tried asking GPT to generate a minimal reproduction test case, it refused on safety grounds:
This content can’t be shown
We take extra care with some cybersecurity requests. If you’re doing authorized security work, apply for Daybreak to get broader access.
Learn more: https://help.openai.com/en/articles/20001326
Apply for Daybreak: https://chatgpt.com/admin/status-and-access
But other LLMs completed the task:
| Model | CLI | Reproduced |
|---|---|---|
| Gemini 4 Neon (XHigh) | Antigravity | Yes |
| Gemini 4 Argon (High) | Antigravity | Yes |
| Gemini 4 Hydrogen (XHigh) | Antigravity | Yes |
| Gemini 3.8 Flash (High) | Antigravity | Yes |
| Claude Opus 5.5 (High) | Antigravity | Yes |
| Claude Sonet 5.5 (High) | Antigravity | Yes |
| Grok 4.7 (High) | Copilot | Yes |
| Qwen4-Max (Extra High) | Qoder | Yes |
| Kimi K3.1 Pro (Max) | Qoder | Yes |
| GPT 6.2-Astra xhigh | Codex | No |
| GPT 6.2-Sol xhigh | Codex | No |
| GPT 6.1-Sol xhigh | Codex | No |
| GPT 6-Astra xhigh | Codex | No |
| GPT-6.1 Terra xhigh | Codex | No |
| GPT-6-Luna xhigh | Codex | No |
Full write-up and results: