Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: arm64 ssa check compilation failure #36755

Closed
josharian opened this issue Jan 24, 2020 · 7 comments
Closed

cmd/compile: arm64 ssa check compilation failure #36755

josharian opened this issue Jan 24, 2020 · 7 comments
Milestone

Comments

@josharian
Copy link
Contributor

@josharian josharian commented Jan 24, 2020

Reproduce:

  • Patch in CL 216418
  • GOOS=linux GOARCH=arm64 go build -gcflags=-d=ssa/check/seed=21431 cmd/internal/obj/s390x

Result:

# cmd/internal/obj/s390x
cmd/internal/obj/s390x/asmz.go:2709:7: internal compiler error: '(*ctxtz).asmout': bad int32 AuxInt value for v8033

goroutine 1 [running]:
runtime/debug.Stack(0x1c3bda0, 0xc0000ac008, 0x0)
	/Users/josh/go/tip/src/runtime/debug/stack.go:24 +0x9d
cmd/compile/internal/gc.Fatalf(0xc000d211a0, 0x23, 0xc0007132a0, 0x2, 0x2)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/subr.go:193 +0x291
cmd/compile/internal/gc.(*ssafn).Fatalf(0xc0004005a0, 0xa9507100000005, 0x1a874ef, 0x1d, 0xc00081d620, 0x1, 0x1)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/ssa.go:6820 +0x1b0
cmd/compile/internal/ssa.(*Func).Fatalf(...)
	/Users/josh/go/tip/src/cmd/compile/internal/ssa/func.go:625
cmd/compile/internal/ssa.checkFunc(0xc002281600)
	/Users/josh/go/tip/src/cmd/compile/internal/ssa/check.go:141 +0x1ece
cmd/compile/internal/ssa.Compile(0xc002281600)
	/Users/josh/go/tip/src/cmd/compile/internal/ssa/compile.go:135 +0xa60
cmd/compile/internal/gc.buildssa(0xc0000ffe40, 0x0, 0x0)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/ssa.go:444 +0xcd8
cmd/compile/internal/gc.compileSSA(0xc0000ffe40, 0x0)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/pgen.go:298 +0x5d
cmd/compile/internal/gc.compile(0xc0000ffe40)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/pgen.go:277 +0x33b
cmd/compile/internal/gc.funccompile(0xc0000ffe40)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/pgen.go:222 +0xc1
cmd/compile/internal/gc.Main(0x1a9b3b8)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/main.go:714 +0x3299
main.main()
	/Users/josh/go/tip/src/cmd/compile/main.go:52 +0xac

cc @cherrymui

@toothrot
Copy link
Contributor

@toothrot toothrot commented Jan 24, 2020

also cc'ing @randall77 @griesemer

Is this concerning enough to be a release blocker? linux/arm64 is a first-class port. If not, I'll change the milestone.

@josharian
Copy link
Contributor Author

@josharian josharian commented Jan 25, 2020

@toothrot hard to say for sure without diagnosing a bit. Let's wait to see what @cherrymui has to say.

@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Jan 26, 2020

It's not very concerning. It is just that the Value's AuxInt doesn't fit in int32 while the AuxInt type is specified as int32. I think the high bits are never used and so don't actually matter. So it shouldn't affect anything when SSA check is not on.

@josharian josharian modified the milestones: Go1.14, Go1.15 Jan 26, 2020
@randall77
Copy link
Contributor

@randall77 randall77 commented May 4, 2020

I can't reproduce now.
(CL 216418 is in, so just trying at tip.)
Was this fixed? By accident, or on purpose?

@josharian
Copy link
Contributor Author

@josharian josharian commented May 5, 2020

It wouldn’t be surprising if the seed required to reproduce changed. I found this by running in a loop with randomly generated seeds. I’ll try that again at some point if no one beats me to it. (It’d still be better to have a builder doing this, not me: #36756)

@josharian
Copy link
Contributor Author

@josharian josharian commented May 5, 2020

Poking through zsh history, looks like I was testing with this:

for i in `seq 10000`; do rnd=$RANDOM; echo seed=$rnd; echo js/wasm; GOOS=js GOARCH=wasm go build -a -gcflags=all=-d=ssa/check/on=$rnd std cmd; for arch in 386 amd64 arm arm64 mips mips64 mips64le mipsle ppc64 ppc64le s390x; do echo linux/$arch; GOOS=linux GOARCH=$arch go build -a -gcflags=all=-d=ssa/check/seed=$rnd std cmd; done; done

Running now.

@josharian
Copy link
Contributor Author

@josharian josharian commented May 5, 2020

Looks fixed, I’d guess by accident as part of strongly typing arm64 rewrite rules.

@josharian josharian closed this May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.