]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: do not write slices/strings > 2g
authorJeff R. Allen <jra@nella.org>
Wed, 8 Nov 2017 08:43:56 +0000 (09:43 +0100)
committerRobert Griesemer <gri@golang.org>
Thu, 9 Nov 2017 18:50:22 +0000 (18:50 +0000)
commitd7ac9bb9927bfdbb1e6aa582d94e10b3374b88ce
tree7de1f856699c7ac491604a2f7403c7cb009bb7ab
parent8fc64a3060bbfcd50d2e0233eac7a184dc1654d4
cmd/compile: do not write slices/strings > 2g

The linker will refuse to work on objects larger than
2e9 bytes (see issue #9862 for why).

With this change, the compiler gives a useful error
message explaining this, instead of leaving it to the
linker to give a cryptic message later.

Fixes #1700.

Change-Id: I3933ce08ef846721ece7405bdba81dff644cb004
Reviewed-on: https://go-review.googlesource.com/74330
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/obj.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/walk.go
src/cmd/link/internal/ld/data.go