develooper Front page | perl.perl5.porters | Postings from July 2012

Re: [perl #113980] [PATCH] pp_syscall: "I32 retval" truncates the returned value

Thread Previous | Thread Next
From:
Bo Lindbergh
Date:
July 4, 2012 19:06
Subject:
Re: [perl #113980] [PATCH] pp_syscall: "I32 retval" truncates the returned value
Message ID:
F94792A6-0027-48E1-AC89-133E200F5D77@stacken.kth.se
Quoth Oleg Nesterov:
> --- 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;
> -    I32 retval = -1;
> +    IV retval = -1;
> 
>    if (PL_tainting) {
> 	while (++MARK <= SP) {

Note that this doesn't help if the syscall function itself is declared as

   int syscall(int, ...);

which is not unheard of.


/Bo Lindbergh


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About