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
I spent a little while digging around in the export data. It looks as though the offending construct is the array type for the struct field RQ. Here is the export data:
Test case for a panic/crash in gccgoimporter caused by incorrect gccgo
export data emission. Note that the *.gox file checked in contains the
correct export data; the main intent of the test is to make sure that
gccgo produces the right export data when run on the Go source.
Updates #30628
Change-Id: I29c0c17b81a43f92ff64fbfcdc58fdb46a5be370
Reviewed-on: https://go-review.googlesource.com/c/go/+/165739
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
kraj
pushed a commit
to kraj/gcc
that referenced
this issue
Mar 7, 2019
In Array_type::do_export, when emitting a concrete array length,
evaluate the length expression to an integer constant and emit that
constant, instead of calling the more general method for emitting
expressions. This is to avoid the possibility that we will need
to emit a conversion, which could confuse the gccgoimporter.
Fixesgolang/go#30628.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/165741
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269443 138bc75d-0d04-0410-961f-82ee72b054a4
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
)?linux/amd64
go env
OutputWhat did you do?
For this package:
When I compile it with tip gccgo, then do something that imports the type information from the object file, the gccgo importer asserts:
I spent a little while digging around in the export data. It looks as though the offending construct is the array type for the struct field RQ. Here is the export data:
Note the type 11 [$convert(<type -3>, 517 )] <type 12> -- the importer parser is not expecting a conversion operation here.
I think it might make sense to fix this in the exporter (strip the conversion there) as opposed to teaching the importer to deal with conversions.
What did you expect to see?
Successful import
What did you see instead?
panic (as outlined above)
The text was updated successfully, but these errors were encountered: