aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/sys_linux_amd64.s
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2012-12-22 15:06:28 -0500
committerRuss Cox <rsc@golang.org>2012-12-22 15:06:28 -0500
commit295a4d8e6433e8a8b6df25375fb780b0f75ff4e6 (patch)
treea2fa377940f50d9361a0adba2c74a71f55c23a25 /src/pkg/runtime/sys_linux_amd64.s
parent0de71619ce591d79297ae609362a8ac1cdb5fe46 (diff)
downloadgo-295a4d8e6433e8a8b6df25375fb780b0f75ff4e6.tar.xz
runtime: ignore failure from madvise
When we release memory to the OS, if the OS doesn't want us to release it (for example, because the program executed mlockall(MCL_FUTURE)), madvise will fail. Ignore the failure instead of crashing. Fixes #3435. R=ken2 CC=golang-dev https://golang.org/cl/6998052
Diffstat (limited to 'src/pkg/runtime/sys_linux_amd64.s')
-rw-r--r--src/pkg/runtime/sys_linux_amd64.s4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pkg/runtime/sys_linux_amd64.s b/src/pkg/runtime/sys_linux_amd64.s
index 3f7a207f37..e459437582 100644
--- a/src/pkg/runtime/sys_linux_amd64.s
+++ b/src/pkg/runtime/sys_linux_amd64.s
@@ -250,9 +250,7 @@ TEXT runtime·madvise(SB),7,$0
MOVQ 24(SP), DX
MOVQ $28, AX // madvise
SYSCALL
- CMPQ AX, $0xfffffffffffff001
- JLS 2(PC)
- MOVL $0xf1, 0xf1 // crash
+ // ignore failure - maybe pages are locked
RET
// int64 futex(int32 *uaddr, int32 op, int32 val,