Re: execve errno setting on MIPS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>this is broken and does cause an EFAULT on x86 as well (you should
>take the warning from gcc about the second argument of execve serious).
 
 Thanks, you are right.
 
>Try:
 
>char *e2BIG[ARG_MAX+1];
>char *envList[]={NULL};
> 
>int main(void)
>{
>  int ret,ind;
> 
>   for(ind = 0; ind < ARG_MAX+1; ind++)
>        e2BIG[ind] = strdup("helloword");
> 
> 
 It wroks on X86 and other Archs.
> 
> 
>And it looks like the ARG_MAX limit is bigger than my installed glibc
>thinks, because it works at least on x86. When I increase the array two
>2 * ARG_MAX I'll get the wanted E2BIG.
 
 Yes, on MIPS we need to increase the ARM_MAX to 2*ARG_MAX to get E2BIG.
 
Thanks,
Halesh

 



This email is confidential and intended only for the use of the individual or entity named above and may contain information that is privileged. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this email is strictly prohibited. If you have received this email in error, please notify us immediately by return email or telephone and destroy the original message. - This mail is sent via Sony Asia Pacific Mail Gateway.

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux