aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/nm
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2017-10-06 15:00:02 -0400
committerCherry Zhang <cherryyz@google.com>2017-11-01 18:23:58 +0000
commit7bd0b6100070d6a24458eded77228d37bfa1eb76 (patch)
treef4b4235e4443e1e7cbe8aa06c54ce51c030c97d4 /src/cmd/nm
parent85c32c3744d879392c43a4ec4772199b28c9b34e (diff)
downloadgo-7bd0b6100070d6a24458eded77228d37bfa1eb76.tar.gz
go-7bd0b6100070d6a24458eded77228d37bfa1eb76.zip
cmd/internal/goobj: accept int64 in readInt
The counter part, writeInt in cmd/internal/obj, writes int64s. So the reader side should also read int64s. This may cause a larger range of values being accepted, some of which should not be that large. This is probably ok: for example, for size/index/length, the very large value (due to corruption) may be well past the end and causes other errors. And we did not do much bound check anyway. One exmaple where this matters is ARM32's object file. For one type of relocation it encodes the instruction into Reloc.Add field (which itself may be problematic and worth fix) and the instruction encoding overflows int32, causing ARM32 object file being rejected by goobj (and so objdump and nm) before. Unskip ARM32 object file tests in goobj, nm, and objdump. Updates #19811. Change-Id: Ia46c2b68df5f1c5204d6509ceab6416ad6372315 Reviewed-on: https://go-review.googlesource.com/69010 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/nm')
-rw-r--r--src/cmd/nm/nm_cgo_test.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/cmd/nm/nm_cgo_test.go b/src/cmd/nm/nm_cgo_test.go
index b32402069a..1dfdf7f21a 100644
--- a/src/cmd/nm/nm_cgo_test.go
+++ b/src/cmd/nm/nm_cgo_test.go
@@ -36,12 +36,5 @@ func TestExternalLinkerCgoExec(t *testing.T) {
}
func TestCgoLib(t *testing.T) {
- if runtime.GOARCH == "arm" {
- switch runtime.GOOS {
- case "darwin", "android", "nacl":
- default:
- t.Skip("skip test due to #19811")
- }
- }
testGoLib(t, true)
}