From c9c64886ef041b096d7f93c4e7d2ef5faf87ad43 Mon Sep 17 00:00:00 2001 From: Cherry Zhang Date: Mon, 19 Oct 2020 10:40:24 -0400 Subject: 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 Trust: Cuong Manh Le Run-TryBot: Cherry Zhang Reviewed-by: Cuong Manh Le TryBot-Result: Go Bot --- test/fixedbugs/issue4348.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/fixedbugs/issue4348.go') 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. -- cgit v1.3-5-g9baa