Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mmap(2) can return EAGAIN on Illumos #493

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions lang/go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ PLIST_VARS+= route
PLIST.route= yes
.endif

pre-build:
cd ${WRKSRC}/src/syscall && \
env GOOS=${LOWER_OPSYS:Q} GOARCH=${GOARCH:Q} \
${PERL5} mksyscall_solaris.pl \
syscall_solaris.go syscall_solaris_amd64.go > zsyscall_solaris_amd64.go

do-build:
cd ${WRKSRC}/src && env GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} GOROOT_FINAL=${GOROOT_FINAL:Q} ${BASH} ./make.bash

Expand Down
2 changes: 1 addition & 1 deletion lang/go/distinfo
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Size (go1.8.1.src.tar.gz) = 15331455 bytes
SHA1 (patch-lib_time_update.bash) = bcf565b97ae7898a9e5cef7686fe42c69bc0bba1
SHA1 (patch-misc_io_clangwrap.sh) = cd91c47ba0fe7b6eb8009dd261c0c26c7d581c29
SHA1 (patch-src_crypto_x509_root__bsd.go) = 0eca1eafa967268ae9b224be4aeda347ebc91901
SHA1 (patch-src_syscall_syscall__solaris.go) = 436371947897dcba574a6dfecc6bbcd04f6e25b2
SHA1 (patch-src_runtime_mem__bsd.go) = a6a261858d59c8eb72a9e0aa839b126369f37aa0
20 changes: 20 additions & 0 deletions lang/go/patches/patch-src_runtime_mem__bsd.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- src/runtime/mem_bsd.go.orig 2017-04-28 12:14:22.000000000 -0700
+++ src/runtime/mem_bsd.go 2017-04-28 12:14:31.000000000 -0700
@@ -76,7 +76,7 @@
flags |= _MAP_FIXED
}
p := mmap(v, n, _PROT_READ|_PROT_WRITE, flags, -1, 0)
- if uintptr(p) == _ENOMEM {
+ if uintptr(p) == _ENOMEM || (GOOS == "solaris" && uintptr(p) == _EAGAIN) {
throw("runtime: out of memory")
}
if p != v {
@@ -87,7 +87,7 @@
}

p := mmap(v, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_FIXED|_MAP_PRIVATE, -1, 0)
- if uintptr(p) == _ENOMEM {
+ if uintptr(p) == _ENOMEM || (GOOS == "solaris" && uintptr(p) == _EAGAIN) {
throw("runtime: out of memory")
}
if p != v {
14 changes: 0 additions & 14 deletions lang/go/patches/patch-src_syscall_syscall__solaris.go

This file was deleted.