From 295a4d8e6433e8a8b6df25375fb780b0f75ff4e6 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 22 Dec 2012 15:06:28 -0500 Subject: 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 --- src/pkg/runtime/sys_linux_386.s | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/pkg/runtime/sys_linux_386.s') diff --git a/src/pkg/runtime/sys_linux_386.s b/src/pkg/runtime/sys_linux_386.s index 60f76fa92f..f27fd47130 100644 --- a/src/pkg/runtime/sys_linux_386.s +++ b/src/pkg/runtime/sys_linux_386.s @@ -241,9 +241,7 @@ TEXT runtime·madvise(SB),7,$0 MOVL 8(SP), CX MOVL 12(SP), DX CALL *runtime·_vdso(SB) - CMPL AX, $0xfffff001 - JLS 2(PC) - INT $3 + // ignore failure - maybe pages are locked RET // int32 futex(int32 *uaddr, int32 op, int32 val, -- cgit v1.3