diff options
author | mischief <mischief@offblast.org> | 2014-12-15 12:55:00 -0800 |
---|---|---|
committer | David du Colombier <0intro@gmail.com> | 2014-12-20 21:41:44 +0000 |
commit | 640c0f3849ca041b047fd02defea78aa29092812 (patch) | |
tree | 490ec88e10d0ddb3f2c9b0cfb34e35ec042abddb /src/runtime/os_plan9.go | |
parent | 64e6fe2d29c3f8ae1e3e38a09bfb92b0452ad51b (diff) | |
download | go-640c0f3849ca041b047fd02defea78aa29092812.tar.gz go-640c0f3849ca041b047fd02defea78aa29092812.zip |
runtime: fix brk_ signature for plan9
with uintptr, the check for < 0 will never succeed in mem_plan9.go's
sbrk() because the brk_ syscall returns -1 on failure. fixes the plan9/amd64 build.
this failed on plan9/amd64 because of the attempt to allocate 136GB in mallocinit(),
which failed. it was just by chance that on plan9/386 allocations never failed.
Change-Id: Ia3059cf5eb752e20d9e60c9619e591b80e8fb03c
Reviewed-on: https://go-review.googlesource.com/1590
Reviewed-by: Anthony Martin <ality@pbrane.org>
Reviewed-by: David du Colombier <0intro@gmail.com>
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Diffstat (limited to 'src/runtime/os_plan9.go')
-rw-r--r-- | src/runtime/os_plan9.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/os_plan9.go b/src/runtime/os_plan9.go index 2dcdfc009a..5a038db497 100644 --- a/src/runtime/os_plan9.go +++ b/src/runtime/os_plan9.go @@ -18,7 +18,7 @@ func seek(fd int32, offset int64, whence int32) int64 func exits(msg *byte) //go:noescape -func brk_(addr unsafe.Pointer) uintptr +func brk_(addr unsafe.Pointer) int32 func sleep(ms int32) int32 |