Skip to content

cmd/compile: "bad ptr to array in slice" in SSA slice handling #71252

@prattmic

Description

@prattmic
#!stacks "cmd/compile/internal/ssagen.(*state).slice:+14" 

Issue created by stacks.

This stack XSjlkw was reported by telemetry:

cmd/compile@go1.23.2 go1.23.2 linux/amd64 (8) 

https://cs.opensource.google/go/go/+/refs/tags/go1.23.2:src/cmd/compile/internal/ssagen/ssa.go;l=6151;drc=a130fb63091bf3103bb7baabbd2484f7e560edae

func (s *state) slice(v, i, j, k *ssa.Value, bounded bool) (p, l, c *ssa.Value) {	t := v.Type	var ptr, len, cap *ssa.Value	switch { ...	case t.IsPtr():	if !t.Elem().IsArray() {	s.Fatalf("bad ptr to array in slice %v\n", t)	} 

cc @golang/compiler

Metadata

Metadata

Assignees

Labels

NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.compiler/telemetry-wins

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions