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_arm.s | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/pkg/runtime/sys_linux_arm.s') diff --git a/src/pkg/runtime/sys_linux_arm.s b/src/pkg/runtime/sys_linux_arm.s index eda7b1f568..53eb7b19d8 100644 --- a/src/pkg/runtime/sys_linux_arm.s +++ b/src/pkg/runtime/sys_linux_arm.s @@ -133,10 +133,7 @@ TEXT runtime·madvise(SB),7,$0 MOVW 8(FP), R2 MOVW $SYS_madvise, R7 SWI $0 - MOVW $0xfffff001, R6 - CMP R6, R0 - MOVW.HI $0, R9 // crash on syscall failure - MOVW.HI R9, (R9) + // ignore failure - maybe pages are locked RET TEXT runtime·setitimer(SB),7,$0 -- cgit v1.3