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: ICE: "width not calculated" building github.com/looker-open-source/sdk-codegen/go #47929

Closed
mdempsky opened this issue Aug 24, 2021 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mdempsky
Copy link
Member

At tip:

$ go mod init example.com
$ go get github.com/looker-open-source/sdk-codegen/go/sdk/v4
go: downloading gopkg.in/ini.v1 v1.61.0
# github.com/looker-open-source/sdk-codegen/go/sdk/v4
/home/mdempsky/go/pkg/mod/github.com/looker-open-source/sdk-codegen/go@v0.0.1/sdk/v4/methods.go:6729:5: internal compiler error: width not calculated: interface {}

Found with internal Google testing. Haven't attempted to minimize yet. If any contributors want to take a look and find a minimal reproducer of this build failure, that would be great. (Post a comment that you're looking into it to minimize redundant work.)

/cc @cuonglm @danscales

@mdempsky mdempsky added help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Aug 24, 2021
@mdempsky mdempsky added this to the Go1.18 milestone Aug 24, 2021
@mdempsky
Copy link
Member Author

mdempsky commented Aug 24, 2021

Minimized:

Edit: Note: This only reproduces if cmd/compile's -p flag is used. go build always sets this, but it needs to be set manually when using go tool compile. Any value seems fine; e.g., -p p reproduces the issue.

package v4

var sink interface{}

//go:noinline
func Do(result, body interface{}) {
	sink = &result
}

func DataAction(result DataActionResponse, body DataActionRequest) {
	Do(&result, body)
}

type DataActionRequest struct {
	Action *interface{}
}

type DataActionResponse struct {
	ValidationErrors *ValidationError
}

type ValidationError struct {
}

@mdempsky mdempsky assigned mdempsky and unassigned mdempsky Aug 24, 2021
@mdempsky
Copy link
Member Author

The issue here is that irgen is failing to CheckSize some of the types it returns. I think the fix is some (most?) of the typ1 calls in noder/types.go need to be changed to typ, but I don't understand the invariants that are expected to be adhered to in the presence of stenciling.

@danscales danscales self-assigned this Aug 24, 2021
@gopherbot
Copy link

Change https://golang.org/cl/344829 mentions this issue: cmd/compile: fix CheckSize() calculation for -G=3 and stencils

@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants