projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2e3921
)
[perl #113980] pp_syscall: "I32 retval" truncates the returned value
author
Oleg Nesterov
<oleg@redhat.com>
Wed, 4 Jul 2012 15:21:15 +0000
(08:21 -0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Wed, 4 Jul 2012 15:53:50 +0000
(08:53 -0700)
I noticed today that syscall(9, ...) (mmap) doesn't work for me.
The problem is obvious, pp_syscall() uses I32 for retval and the
"long" address doesn't fit into "int".
The one-liner below should fix the problem.
pp_sys.c
patch
|
blob
|
history
diff --git
a/pp_sys.c
b/pp_sys.c
index
fb93732
..
c5d63ac
100644
(file)
--- a/
pp_sys.c
+++ b/
pp_sys.c
@@
-5456,7
+5456,7
@@
PP(pp_syscall)
register I32 items = SP - MARK;
unsigned long a[20];
register I32 i = 0;
- I
32
retval = -1;
+ I
V
retval = -1;
if (PL_tainting) {
while (++MARK <= SP) {