Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: <autogenerated>:1:0: invalid instruction: 00000 (/home/xxx/main.go:8) MOVQ $0, "".n+2147483680(SP) #25507
What version of Go are you using (
changed the title
<autogenerated>:1:0: invalid instruction: 00000 (/home/xxx/main.go:8) MOVQ $0, "".n+2147483680(SP)
May 23, 2018
I don't think we ever expect this to work. You're putting a 2GB object on the stack. We limit stacks to 1GB.
We could obviously use a better error message. We should detect bad cases like this earlier in compilation, before we try to make a stack frame so big that instructions can't address it.
@josharian Looks like the stack size check is for the frame of the function itself. It does not include the size of the arguments, which would be part of the parent function. So we would fail if there were a call to