]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj: reject too large symbols
authorCherry Zhang <cherryyz@google.com>
Mon, 19 Oct 2020 14:40:24 +0000 (10:40 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 20 Oct 2020 18:51:03 +0000 (18:51 +0000)
commitc9c64886ef041b096d7f93c4e7d2ef5faf87ad43
tree7274e2a5b53be275bb6315f5ad8a3318cc92d8c2
parente2c420591cbbd684594a111fa5cdeb40c68964a5
cmd/internal/obj: reject too large symbols

We never supported symbol larger than 2GB (issue #9862), so the
object file uses 32-bit for symbol sizes. Check and reject too
large symbol before truncating its size.

Fixes #42054.

Change-Id: I0d1d585ebdba9556f2fd3a97043bd4296d5cc9e4
Reviewed-on: https://go-review.googlesource.com/c/go/+/263641
Trust: Cherry Zhang <cherryyz@google.com>
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/internal/obj/objfile.go
src/cmd/internal/obj/objfile_test.go
test/fixedbugs/issue4348.go