diff options
| author | Robert Findley <rfindley@google.com> | 2023-08-07 15:46:34 -0400 |
|---|---|---|
| committer | Robert Findley <rfindley@google.com> | 2023-08-07 21:16:51 +0000 |
| commit | 008ab9adb8382a274ba25c005a046b912af94809 (patch) | |
| tree | c72c9a95117ed4d8f679d2b10b6ab06d287f6572 /src/runtime/stack.go | |
| parent | aca6577196d61073a74c2ba791aa89c166db9521 (diff) | |
| download | go-008ab9adb8382a274ba25c005a046b912af94809.tar.xz | |
go/types: fix panic in allowVersion when pos is invalid
CL 515656 updated go/types to use file base as key in the posVers map,
but introduced a panic when the corresponding *token.File is nil.
Check that pos is valid before performing the lookup.
Fixes #61822
Change-Id: I1ac9d48c831a470de8439a50022ba5f59b3e0bed
Reviewed-on: https://go-review.googlesource.com/c/go/+/516738
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/runtime/stack.go')
0 files changed, 0 insertions, 0 deletions
