diff options
author | Clément Chigot <clement.chigot@atos.net> | 2018-10-01 09:58:40 +0200 |
---|---|---|
committer | Lynn Boger <laboger@linux.vnet.ibm.com> | 2018-11-26 14:06:28 +0000 |
commit | 041526c6ef669743afc6c4b757b95011f1475d1a (patch) | |
tree | 51b16e5ff8e6fe5290d3c7271508b6676c24c748 /test/chancap.go | |
parent | bb3b24bffc4f50c64504c1c5f899aad0281a449a (diff) | |
download | go-041526c6ef669743afc6c4b757b95011f1475d1a.tar.gz go-041526c6ef669743afc6c4b757b95011f1475d1a.zip |
runtime: handle 64bits addresses for AIX
This commit allows the runtime to handle 64bits addresses returned by
mmap syscall on AIX.
Mmap syscall returns addresses on 59bits on AIX. But the Arena
implementation only allows addresses with less than 48 bits.
This commit increases the arena size up to 1<<60 for aix/ppc64.
Update: #25893
Change-Id: Iea72e8a944d10d4f00be915785e33ae82dd6329e
Reviewed-on: https://go-review.googlesource.com/c/138736
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'test/chancap.go')
-rw-r--r-- | test/chancap.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/chancap.go b/test/chancap.go index 9675e38bdb..8dce9247cd 100644 --- a/test/chancap.go +++ b/test/chancap.go @@ -42,8 +42,10 @@ func main() { shouldPanic("makechan: size out of range", func() { _ = make(T, n) }) shouldPanic("makechan: size out of range", func() { _ = make(T, int64(n)) }) if ptrSize == 8 { - var n2 int64 = 1 << 50 + // Test mem > maxAlloc + var n2 int64 = 1 << 59 shouldPanic("makechan: size out of range", func() { _ = make(T, int(n2)) }) + // Test elem.size*cap overflow n2 = 1<<63 - 1 shouldPanic("makechan: size out of range", func() { _ = make(T, int(n2)) }) } else { |