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
Assignees
Labels
Milestone

Comments

@mdempsky
Copy link
Member

@mdempsky mdempsky commented Aug 24, 2021

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
Copy link
Member Author

@mdempsky 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 {
}

Loading

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

@mdempsky mdempsky commented Aug 24, 2021

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.

Loading

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

@gopherbot gopherbot commented Aug 24, 2021

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

Loading

@gopherbot gopherbot closed this in 099b819 Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants