Skip to content

Commit

Permalink
[perl #113980] pp_syscall: "I32 retval" truncates the returned value
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
oleg-nesterov authored and Father Chrysostomos committed Jul 4, 2012
1 parent a2e3921 commit f9344c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pp_sys.c
Expand Up @@ -5456,7 +5456,7 @@ PP(pp_syscall)
register I32 items = SP - MARK;
unsigned long a[20];
register I32 i = 0;
I32 retval = -1;
IV retval = -1;

if (PL_tainting) {
while (++MARK <= SP) {
Expand Down

0 comments on commit f9344c9

Please sign in to comment.