httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: 2.03-dev-rc3 (was Re: 5.6.1 segfaults during perl tests)
Date Fri, 11 Jun 2004 13:51:06 GMT
Geoffrey Young <geoff@modperlcookbook.org> writes:

> > Folks,
> > 
> >   Please try this bundle and report back,
> > especially if you encountered problems testing
> > a previous candidate.
> > 
> >   http://cvs.apache.org/~joes/libapreq2-2.03-dev-rc3.tar.gz
> > 
> > After a few +1s we'll let the modperl list take
> > a crack at it.
> 
> I am getting warnings with fedora core 1 (gcc 3.3.2) on 2.0.49 and 2.0 dev.
> 
> Apache__Request.h: In function `apreq_xs_upload_slurp':
> Apache__Request.h:203: warning: passing arg 3 of `apr_brigade_flatten' from
> incompatible pointer type
> 
> since I build with -Werror this stops things for me (and -Werror is a good
> idea for us developers anyway, since stas will inevitably pick up on it and
> let you know ;)
> 
> apr_brigade_flatten takes an apr_size_t while apr_brigade_length takes an
> apr_off_t (go figure).  

It's because brigades can represent data streams (eg files) that may be 
larger than available memory.  But reading a brigade into a string
does demand the brigade actually fit; thus the (usually smaller) apr_size_t 
instead of apr_off_t.

> anyway, I tried fixing it by declaring both types and using some casts
> so it compiles, but I get core dumps left and right in the tests.  so
> sorry, no patch from me atm.

I'm aware of the warning, but have not bothered to deal with it.
Typecasts might be a mistake here (because we're mixing
signed and unsigned numeric types).  Maybe we just need an extra 
apr_size_t variable?

-- 
Joe Schaefer


Mime
View raw message