You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Nick Kew <ni...@webthing.com> on 2009/01/06 16:47:45 UTC

Re: svn commit: r731965 - /httpd/httpd/trunk/modules/generators/mod_cgid.c

[crossposting because this httpd issue raises an APR issue]

Jeff Trawick wrote:
> On Tue, Jan 6, 2009 at 10:05 AM, <trawick@apache.org 
> <ma...@apache.org>> wrote:
> 
>     Author: trawick
>     Date: Tue Jan  6 07:05:33 2009
>     New Revision: 731965
> 
>     URL: http://svn.apache.org/viewvc?rev=731965&view=rev
>     <http://svn.apache.org/viewvc?rev=731965&view=rev>
>     Log:
>     the length arguments are apr_size_t, not int

How is it apr_size_t?

I see the following in apr_want.h.  Neither definition uses
apr_size_t.  "man iovec" shows int on Solaris, size_t on
FreeBSD and Linux.  Never AFAICS an apr_size_t.

apr_want.h contains the following, which appears to leave open
the possibility of not having it at all.  Do we have a deeper bug
here that calls for an apr_iovec datatype matching the platform?


#if APR_HAVE_IOVEC

#if APR_HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif

#else

struct iovec
{
     char *iov_base;
     size_t iov_len;
};

#endif

-- 
Nick Kew

Re: svn commit: r731965 - /httpd/httpd/trunk/modules/generators/mod_cgid.c

Posted by Nick Kew <ni...@webthing.com>.
Plüm, Rüdiger, VF-Group wrote:

> I guess what is important here is that all length parameters passed to 
> sock_writev as variable parameters are of size_t. So the second argument
> given to va_arg should reflect this. IMHO it doesn't matter what type
> we have in the iovec struct for this purpose.

Sorry, yes, Jeff was right.  Looking at what gets passed to the
vararg-consuming function, that's apr_size_t.

Jeff, you have my +1 to add r731965 to my backport proposal in STATUS.

-- 
Nick Kew

Re: svn commit: r731965 - /httpd/httpd/trunk/modules/generators/mod_cgid.c

Posted by "Plüm, Rüdiger, VF-Group" <ru...@vodafone.com>.
 

> -----Ursprüngliche Nachricht-----
> Von: Nick Kew [mailto:nick@webthing.com] 
> Gesendet: Dienstag, 6. Januar 2009 16:48
> An: dev@httpd.apache.org; dev@apr.apache.org
> Betreff: Re: svn commit: r731965 - 
> /httpd/httpd/trunk/modules/generators/mod_cgid.c
> 
> [crossposting because this httpd issue raises an APR issue]
> 
> Jeff Trawick wrote:
> > On Tue, Jan 6, 2009 at 10:05 AM, <trawick@apache.org 
> > <ma...@apache.org>> wrote:
> > 
> >     Author: trawick
> >     Date: Tue Jan  6 07:05:33 2009
> >     New Revision: 731965
> > 
> >     URL: http://svn.apache.org/viewvc?rev=731965&view=rev
> >     <http://svn.apache.org/viewvc?rev=731965&view=rev>
> >     Log:
> >     the length arguments are apr_size_t, not int
> 
> How is it apr_size_t?

I guess what is important here is that all length parameters passed to 
sock_writev as variable parameters are of size_t. So the second argument
given to va_arg should reflect this. IMHO it doesn't matter what type
we have in the iovec struct for this purpose.

Regards

Rüdiger


Re: svn commit: r731965 - /httpd/httpd/trunk/modules/generators/mod_cgid.c

Posted by Jim Jagielski <ji...@jaguNET.com>.
On Jan 6, 2009, at 11:31 AM, William A. Rowe, Jr. wrote:

> Nick Kew wrote:
>> [crossposting because this httpd issue raises an APR issue]
>>
>> Jeff Trawick wrote:
>>> On Tue, Jan 6, 2009 at 10:05 AM, <trawick@apache.org
>>> <ma...@apache.org>> wrote:
>>>
>>>    Author: trawick
>>>    Date: Tue Jan  6 07:05:33 2009
>>>    New Revision: 731965
>>>
>>>    URL: http://svn.apache.org/viewvc?rev=731965&view=rev
>>>    <http://svn.apache.org/viewvc?rev=731965&view=rev>
>>>    Log:
>>>    the length arguments are apr_size_t, not int
>>
>> How is it apr_size_t?
>>
>> I see the following in apr_want.h.  Neither definition uses
>> apr_size_t.  "man iovec" shows int on Solaris, size_t on
>> FreeBSD and Linux.  Never AFAICS an apr_size_t.
>>
>> apr_want.h contains the following, which appears to leave open
>> the possibility of not having it at all.  Do we have a deeper bug
>> here that calls for an apr_iovec datatype matching the platform?
>
> Yes, I think we need an apr_iov_len_t type.
>

+1


Re: svn commit: r731965 - /httpd/httpd/trunk/modules/generators/mod_cgid.c

Posted by Jim Jagielski <ji...@jaguNET.com>.
On Jan 6, 2009, at 11:31 AM, William A. Rowe, Jr. wrote:

> Nick Kew wrote:
>> [crossposting because this httpd issue raises an APR issue]
>>
>> Jeff Trawick wrote:
>>> On Tue, Jan 6, 2009 at 10:05 AM, <trawick@apache.org
>>> <ma...@apache.org>> wrote:
>>>
>>>    Author: trawick
>>>    Date: Tue Jan  6 07:05:33 2009
>>>    New Revision: 731965
>>>
>>>    URL: http://svn.apache.org/viewvc?rev=731965&view=rev
>>>    <http://svn.apache.org/viewvc?rev=731965&view=rev>
>>>    Log:
>>>    the length arguments are apr_size_t, not int
>>
>> How is it apr_size_t?
>>
>> I see the following in apr_want.h.  Neither definition uses
>> apr_size_t.  "man iovec" shows int on Solaris, size_t on
>> FreeBSD and Linux.  Never AFAICS an apr_size_t.
>>
>> apr_want.h contains the following, which appears to leave open
>> the possibility of not having it at all.  Do we have a deeper bug
>> here that calls for an apr_iovec datatype matching the platform?
>
> Yes, I think we need an apr_iov_len_t type.
>

+1


Re: svn commit: r731965 - /httpd/httpd/trunk/modules/generators/mod_cgid.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Nick Kew wrote:
> [crossposting because this httpd issue raises an APR issue]
> 
> Jeff Trawick wrote:
>> On Tue, Jan 6, 2009 at 10:05 AM, <trawick@apache.org
>> <ma...@apache.org>> wrote:
>>
>>     Author: trawick
>>     Date: Tue Jan  6 07:05:33 2009
>>     New Revision: 731965
>>
>>     URL: http://svn.apache.org/viewvc?rev=731965&view=rev
>>     <http://svn.apache.org/viewvc?rev=731965&view=rev>
>>     Log:
>>     the length arguments are apr_size_t, not int
> 
> How is it apr_size_t?
> 
> I see the following in apr_want.h.  Neither definition uses
> apr_size_t.  "man iovec" shows int on Solaris, size_t on
> FreeBSD and Linux.  Never AFAICS an apr_size_t.
> 
> apr_want.h contains the following, which appears to leave open
> the possibility of not having it at all.  Do we have a deeper bug
> here that calls for an apr_iovec datatype matching the platform?

Yes, I think we need an apr_iov_len_t type.

Bill

Re: svn commit: r731965 - /httpd/httpd/trunk/modules/generators/mod_cgid.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Nick Kew wrote:
> [crossposting because this httpd issue raises an APR issue]
> 
> Jeff Trawick wrote:
>> On Tue, Jan 6, 2009 at 10:05 AM, <trawick@apache.org
>> <ma...@apache.org>> wrote:
>>
>>     Author: trawick
>>     Date: Tue Jan  6 07:05:33 2009
>>     New Revision: 731965
>>
>>     URL: http://svn.apache.org/viewvc?rev=731965&view=rev
>>     <http://svn.apache.org/viewvc?rev=731965&view=rev>
>>     Log:
>>     the length arguments are apr_size_t, not int
> 
> How is it apr_size_t?
> 
> I see the following in apr_want.h.  Neither definition uses
> apr_size_t.  "man iovec" shows int on Solaris, size_t on
> FreeBSD and Linux.  Never AFAICS an apr_size_t.
> 
> apr_want.h contains the following, which appears to leave open
> the possibility of not having it at all.  Do we have a deeper bug
> here that calls for an apr_iovec datatype matching the platform?

Yes, I think we need an apr_iov_len_t type.

Bill