734417
From f9344c91a4ca48288bba30dc94a2d712d0659670 Mon Sep 17 00:00:00 2001
734417
From: Oleg Nesterov <oleg@redhat.com>
734417
Date: Wed, 4 Jul 2012 08:21:15 -0700
734417
Subject: [PATCH] [perl #113980] pp_syscall: "I32 retval" truncates the
734417
 returned value
734417
734417
I noticed today that syscall(9, ...) (mmap) doesn't work for me.
734417
734417
The problem is obvious, pp_syscall() uses I32 for retval and the
734417
"long" address doesn't fit into "int".
734417
734417
The one-liner below should fix the problem.
734417
---
734417
 pp_sys.c | 2 +-
734417
 1 file changed, 1 insertion(+), 1 deletion(-)
734417
734417
diff --git a/pp_sys.c b/pp_sys.c
734417
index fb93732..c5d63ac 100644
734417
--- a/pp_sys.c
734417
+++ b/pp_sys.c
734417
@@ -5456,7 +5456,7 @@ PP(pp_syscall)
734417
     register I32 items = SP - MARK;
734417
     unsigned long a[20];
734417
     register I32 i = 0;
734417
-    I32 retval = -1;
734417
+    IV retval = -1;
734417
 
734417
     if (PL_tainting) {
734417
 	while (++MARK <= SP) {
734417
-- 
734417
1.7.11.4
734417