-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.arch-loong64Issues solely affecting the loongson architecture.Issues solely affecting the loongson architecture.
Milestone
Description
$ gotip version
go version devel go1.19-69b412b7d6 Fri May 20 19:01:40 2022 +0000 linux/amd64
package p
var V []int
func f(i int, c chan int) int {
arr := []int{0, 1}
for range c {
for a2 := range arr {
var a []int
V = V[:1/a2]
a[i] = 0
}
return func() int {
arr = []int{}
return func() int {
return func() int {
return func() int { return 4 }()
}()
}()
}()
}
return 0
}
$ GOARCH=loong64 gotip tool compile crash.go
crash.go:7:6: internal compiler error: 'f': panic during lower while compiling f:
runtime error: integer divide by zero
goroutine 1 [running]:
cmd/compile/internal/ssa.Compile.func1()
/home/alberto/gotip/src/cmd/compile/internal/ssa/compile.go:50 +0x71
panic({0xcc28e0, 0x133b7b0})
/home/alberto/gotip/src/runtime/panic.go:884 +0x212
cmd/compile/internal/ssa.rewriteValueLOONG64_OpSelect1(0xc0004819d0)
/home/alberto/gotip/src/cmd/compile/internal/ssa/rewriteLOONG64.go:7060 +0x6cd
cmd/compile/internal/ssa.rewriteValueLOONG64(0xc0004b7940?)
/home/alberto/gotip/src/cmd/compile/internal/ssa/rewriteLOONG64.go:573 +0x1e71
cmd/compile/internal/ssa.applyRewrite(0xc0004028c0, 0xd67b50, 0xd67bd0, 0x1)
/home/alberto/gotip/src/cmd/compile/internal/ssa/rewrite.go:133 +0xfd6
cmd/compile/internal/ssa.lower(0xc0004028c0?)
/home/alberto/gotip/src/cmd/compile/internal/ssa/lower.go:10 +0x2f
cmd/compile/internal/ssa.Compile(0xc0004028c0)
/home/alberto/gotip/src/cmd/compile/internal/ssa/compile.go:98 +0x9be
...
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.arch-loong64Issues solely affecting the loongson architecture.Issues solely affecting the loongson architecture.