You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cmd/compile: incorrect type set intersection computation [1.18 backport] #57498
changed the title [-]cmd/compile: incorrectly allow to use a type parameter as type argument (not very sure it is a bug or not) [1.18 backport][/-][+]cmd/compile: incorrect type set intersection computation [1.18 backport][/+]on Dec 28, 2022
The primary reason for backporting would be for people who cannot (or don't want to) move to 1.20. People using 1.18 and and 1.19 can write code that the compiler accepts but that is in fact incorrect (though I don't have a simple example where such incorrectly compiled code can be used to exploit something - it'll take some ingenuity to find such an example).
The actual fix in the type checker is extremely straight-forward - most of the rest of the CL is simply for the test cases. I'm not worried too much about collateral damage.
My take: if there's no more point release for 1.18 and 1.19, then let's not do this. If there are point releases for other reasons, then let's include this fix.
Activity
[-]cmd/compile: incorrectly allow to use a type parameter as type argument (not very sure it is a bug or not) [1.18 backport][/-][+]cmd/compile: incorrect type set intersection computation [1.18 backport][/+]gopherbot commentedon Dec 29, 2022
Change https://go.dev/cl/460015 mentions this issue:
[release-branch.go1.18] go/types, types2: use strict comparability for type set intersectiongriesemer commentedon Jan 4, 2023
The primary reason for backporting would be for people who cannot (or don't want to) move to 1.20. People using 1.18 and and 1.19 can write code that the compiler accepts but that is in fact incorrect (though I don't have a simple example where such incorrectly compiled code can be used to exploit something - it'll take some ingenuity to find such an example).
The actual fix in the type checker is extremely straight-forward - most of the rest of the CL is simply for the test cases. I'm not worried too much about collateral damage.
My take: if there's no more point release for 1.18 and 1.19, then let's not do this. If there are point releases for other reasons, then let's include this fix.
heschi commentedon Jan 18, 2023
We aren't going to do another minor release for 1.18. Closing this one.