]> Cypherpunks repositories - gostls13.git/commit
cmd/link: skip zero values in fingerprint check
authorCherry Zhang <cherryyz@google.com>
Tue, 23 Jun 2020 16:02:54 +0000 (12:02 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 23 Jun 2020 18:38:32 +0000 (18:38 +0000)
commit9f33108dfa22946622a8a78b5cd3f64cd3e455dd
tree8b903ae12ee27f968bf5a68becb1150bc3dda483
parent18bcc7c2854f900dfb631d7ef01a839021e24576
cmd/link: skip zero values in fingerprint check

Normally, packages are loaded in dependency order, and if a
Library object is not nil, it is already loaded with the actual
fingerprint. In shared build mode, however, packages may be added
not in dependency order (e.g. go install -buildmode=shared std
adds all std packages before loading them), and it is possible
that a Library's fingerprint is not yet loaded. Skip the check
in this case (when the fingerprint is the zero value).

Fixes #39777.

Change-Id: I66208e92bf687c8778963ba8e33e9bd948f82f3a
Reviewed-on: https://go-review.googlesource.com/c/go/+/239517
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
misc/cgo/testshared/shared_test.go
misc/cgo/testshared/testdata/issue39777/a/a.go [new file with mode: 0644]
misc/cgo/testshared/testdata/issue39777/b/b.go [new file with mode: 0644]
src/cmd/link/internal/ld/ld.go