]> Cypherpunks repositories - gostls13.git/commit
go/internal/gccgoimporter: fix bug reading V1 export data
authorThan McIntosh <thanm@google.com>
Fri, 30 Nov 2018 14:50:05 +0000 (09:50 -0500)
committerThan McIntosh <thanm@google.com>
Fri, 30 Nov 2018 20:00:49 +0000 (20:00 +0000)
commit13aa235ae0b441989f6ac3cb5ea953836dcdfdde
tree579f49f2721b7e45e66acfb36d8da977c1109e51
parent950100a95c700fb60cafc51276786dd93f85d6c9
go/internal/gccgoimporter: fix bug reading V1 export data

Fix a bug in the reading of elderly export data. In such export data
when reading type information it's possible to encounter a named type N1
defined as a typedef of some other named type N2 at a point when the
underying type of N1 has not yet been finalized. Handle this case by
generating a fixup, then process fixups at the end of parsing to
set the correct underlying type.

Fixes #29006.

Change-Id: I6a505c897bd95eb161ee04637bb6eebad9f20d52
Reviewed-on: https://go-review.googlesource.com/c/151997
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/go/internal/gccgoimporter/importer_test.go
src/go/internal/gccgoimporter/parser.go
src/go/internal/gccgoimporter/testdata/v1reflect.gox [new file with mode: 0644]