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: "internal compiler error: mayCall" while running unsafebuiltins test on linux-amd64-noopt builder #45917

Closed
bcmills opened this issue May 3, 2021 · 2 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages)
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented May 3, 2021

The linux-amd64-noopt builder is consistently failing due to an internal compiler error: mayCall in test/unsafebuiltins.go (added in CL 312214 for #19367 and #40481).

##### ../test
# go run run.go -- unsafebuiltins.go
exit status 2
# command-line-arguments
./unsafebuiltins.go:22:20: internal compiler error: mayCall 
.   UNSAFEADD tc(1) UNSAFEPTR-unsafe.Pointer # unsafebuiltins.go:22 UNSAFEPTR-unsafe.Pointer
.   .   NAME-main.p1 esc(no) tc(1) Class:PAUTO Offset:0 OnStack Used UNSAFEPTR-unsafe.Pointer # unsafebuiltins.go:21
.   .   LITERAL-1 tc(1) int # unsafebuiltins.go:22

goroutine 1 [running]:
runtime/debug.Stack()
	/workdir/go/src/runtime/debug/stack.go:24 +0x7a
cmd/compile/internal/base.FatalfAt({0x2, 0x16140}, {0x10f7acb, 0xb}, {0xc00040e9c8, 0x1, 0x1})
	/workdir/go/src/cmd/compile/internal/base/print.go:227 +0x20a
cmd/compile/internal/walk.mayCall.func2({0x12338e0, 0xc0003d5020})
	/workdir/go/src/cmd/compile/internal/walk/walk.go:309 +0x7b2
cmd/compile/internal/ir.Any.func1({0x12338e0, 0xc0003d5020})
	/workdir/go/src/cmd/compile/internal/ir/visit.go:130 +0x4d
cmd/compile/internal/ir.(*BinaryExpr).doChildren(0xc0003d4480, 0xc00041e228)
	/workdir/go/src/cmd/compile/internal/ir/node_gen.go:193 +0xab
cmd/compile/internal/ir.DoChildren({0x12338e0, 0xc0003d4480}, 0xc00041e228)
	/workdir/go/src/cmd/compile/internal/ir/visit.go:94 +0x4c
cmd/compile/internal/ir.Any.func1({0x12338e0, 0xc0003d4480})
	/workdir/go/src/cmd/compile/internal/ir/visit.go:130 +0x74
cmd/compile/internal/ir.Any({0x12338e0, 0xc0003d4480}, 0xc00005d7b0)
	/workdir/go/src/cmd/compile/internal/ir/visit.go:132 +0x10f
cmd/compile/internal/walk.mayCall({0x12338e0, 0xc0003d4480})
	/workdir/go/src/cmd/compile/internal/walk/walk.go:300 +0xa9
cmd/compile/internal/walk.walkCall1(0xc00017c7e0, 0xc00040f690)
	/workdir/go/src/cmd/compile/internal/walk/expr.go:584 +0x77c
cmd/compile/internal/walk.walkCall(0xc00017c7e0, 0xc00040f690)
	/workdir/go/src/cmd/compile/internal/walk/expr.go:542 +0x9e5
cmd/compile/internal/walk.walkExpr1({0x1233b38, 0xc00017c7e0}, 0xc00040f690)
	/workdir/go/src/cmd/compile/internal/walk/expr.go:172 +0x928
cmd/compile/internal/walk.walkExpr({0x1233b38, 0xc00017c7e0}, 0xc00040f690)
	/workdir/go/src/cmd/compile/internal/walk/expr.go:55 +0x44d
cmd/compile/internal/walk.walkStmt({0x1233b38, 0xc00017c7e0})
	/workdir/go/src/cmd/compile/internal/walk/stmt.go:59 +0x9da
cmd/compile/internal/walk.walkStmtList({0xc00036aa00, 0x1a, 0x20})
	/workdir/go/src/cmd/compile/internal/walk/stmt.go:169 +0x89
cmd/compile/internal/walk.Walk(0xc00001e6e0)
	/workdir/go/src/cmd/compile/internal/walk/walk.go:43 +0x1f7
cmd/compile/internal/gc.prepareFunc(0xc00001e6e0)
	/workdir/go/src/cmd/compile/internal/gc/compile.go:86 +0x73
cmd/compile/internal/gc.enqueueFunc(0xc00001e6e0)
	/workdir/go/src/cmd/compile/internal/gc/compile.go:60 +0x389
cmd/compile/internal/gc.Main(0x11236d8)
	/workdir/go/src/cmd/compile/internal/gc/main.go:281 +0x1231
main.main()
	/workdir/go/src/cmd/compile/main.go:55 +0x15e

CC @mdempsky @randall77 @cuonglm

@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages) labels May 3, 2021
@bcmills bcmills added this to the Go1.17 milestone May 3, 2021
@mdempsky
Copy link
Member

mdempsky commented May 3, 2021

Thanks.

I think this should just be a matter of adding OUNSAFEADD and OUNSAFESLICE to the switch statement in mayCall. I'll send a CL tomorrow if no one beats me to it.

@gopherbot
Copy link

Change https://golang.org/cl/316170 mentions this issue: cmd/compile: fix linux-amd64-noopt builder

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages)
Projects
None yet
Development

No branches or pull requests

3 participants