aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-10-19 10:40:24 -0400
committerCherry Zhang <cherryyz@google.com>2020-10-20 18:51:03 +0000
commitc9c64886ef041b096d7f93c4e7d2ef5faf87ad43 (patch)
tree7274e2a5b53be275bb6315f5ad8a3318cc92d8c2 /test
parente2c420591cbbd684594a111fa5cdeb40c68964a5 (diff)
downloadgo-c9c64886ef041b096d7f93c4e7d2ef5faf87ad43.tar.gz
go-c9c64886ef041b096d7f93c4e7d2ef5faf87ad43.zip
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>
Diffstat (limited to 'test')
-rw-r--r--test/fixedbugs/issue4348.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/fixedbugs/issue4348.go b/test/fixedbugs/issue4348.go
index c59b6b8caa..8b1a56c1d5 100644
--- a/test/fixedbugs/issue4348.go
+++ b/test/fixedbugs/issue4348.go
@@ -1,4 +1,4 @@
-// compile
+// skip
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,6 +7,8 @@
// Issue 4348. After switch to 64-bit ints the compiler generates
// illegal instructions when using large array bounds or indexes.
+// Skip. We reject symbols larger that 2GB (Issue #9862).
+
package main
// 1<<32 on a 64-bit machine, 1 otherwise.