-
Notifications
You must be signed in to change notification settings - Fork 18.1k
gccgo: internal compiler error: in set_type_index #52841
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
Labels
Milestone
Comments
Change https://go.dev/cl/405759 mentions this issue: |
Change https://go.dev/cl/405556 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
May 12, 2022
For #52841 Change-Id: If4723a70fba0dbedb5d1e70dab58f0b4612bf8b9 Reviewed-on: https://go-review.googlesource.com/c/go/+/405759 Auto-Submit: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
xionghul
pushed a commit
to xionghul/gcc
that referenced
this issue
May 13, 2022
The exporter relies on sorting interface parse methods. It would sort them as it encountered interface types. However, when an interface type is an element of a struct or array type, the exporter might encounter that interface type before sorting the parse methods. If it then encountered an identical interface type again, it could get confused about whether the two types are identical or not. Fix the problem by always sorting the parse methods in the finalize_methods pass. Also firm up the export type sorting to make sure we never have this kind of confusion again. Doing this revealed that we need to be more careful about sorting in order to handle aliases correctly. Also fix the interface type hash computation to use the right hash value when looking at parse methods rather than all methods. The test case for this is https://go.dev/cl/405759. Fixes golang/go#52841 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/405556
realqhc
pushed a commit
to realqhc/gofrontend
that referenced
this issue
Aug 4, 2022
The exporter relies on sorting interface parse methods. It would sort them as it encountered interface types. However, when an interface type is an element of a struct or array type, the exporter might encounter that interface type before sorting the parse methods. If it then encountered an identical interface type again, it could get confused about whether the two types are identical or not. Fix the problem by always sorting the parse methods in the finalize_methods pass. Also firm up the export type sorting to make sure we never have this kind of confusion again. Doing this revealed that we need to be more careful about sorting in order to handle aliases correctly. Also fix the interface type hash computation to use the right hash value when looking at parse methods rather than all methods. The test case for this is https://go.dev/cl/405759. Fixes golang/go#52841 Change-Id: I6243246148dbd96df8d2f2244516443d9bd6b114 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/405556 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Than McIntosh <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://go.dev/play/p/lU3CSLY5h5F
using gccgo:
go build -compiler=gccgo -gccgoflags="-static-libgo
What did you expect to see?
Compile successfully.
What did you see instead?
bugReview
go1: internal compiler error: in set_type_index, at go/gofrontend/export.cc:741
0x753287 Export::set_type_index(Type const*)
../../gcc-12.1.0/gcc/go/gofrontend/export.cc:741
0x7c2517 Export::assign_type_indices(std::vector<Named_object*, std::allocator<Named_object*> > const&)
../../gcc-12.1.0/gcc/go/gofrontend/export.cc:789
0x7c3a91 Export::export_globals(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::map<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, Package*, std::less<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const, Package*> > > const&, std::map<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, Package*, std::less<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const, Package*> > > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, Import_init_set const&, Bindings const*, std::unordered_set<Named_object*, std::hash<Named_object*>, std::equal_to<Named_object*>, std::allocator<Named_object*> >*)
../../gcc-12.1.0/gcc/go/gofrontend/export.cc:645
0x81e787 Gogo::do_exports()
../../gcc-12.1.0/gcc/go/gofrontend/gogo.cc:5231
0x80e8bb go_parse_input_files(char const**, unsigned int, bool, bool)
../../gcc-12.1.0/gcc/go/gofrontend/go.cc:159
0x80a03f go_langhook_parse_file
../../gcc-12.1.0/gcc/go/go-lang.cc:359
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See https://gcc.gnu.org/bugs/ for instructions.
The text was updated successfully, but these errors were encountered: