Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: stack overflow on invalid map key type #21657
What version of Go are you using (
Generally, this would be handled by dowidth setting Broke on invalid recursive struct types. Also, algtype checks for Broke.
The problem is we're calling algtype to validate map key types during typechecking before we've called dowidth on those key types, and before it's even safe to do so.
We have some logic for deferring map key type validation until it's safe. I think the solution is to extend that to defer validation more often, maybe even all the time.