apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyrum K. Wright" <hyrum_wri...@mail.utexas.edu>
Subject Re: Crash in apr_psprintf(), 1.4.x branch
Date Thu, 11 Mar 2010 17:08:21 GMT

On Mar 11, 2010, at 11:04 AM, Dan Poirier wrote:

> On Wed, 10 Mar 2010 17:50 -0600, "William A. Rowe Jr."
> <wrowe@rowe-clan.net> wrote:
>> On 3/10/2010 4:45 PM, Hyrum K. Wright wrote:
>>> Digging deeper, it appears to be an error in apr_vformatter() when parsing the
format '%lld'.  I'm running the tests on Mac OS X where APR_OFF_FMT_T is defined as lld, so
this format occurs frequently.  Consequently, I'm also seeing a failure in testfmt at line
63, where the parser is attempting to parse APR_OFF_FMT_T, but failing.  Can anybody else
replicate this bug?
>> Yes, this function isn't maintained on Mac OS/X.  Which is something
>> of a surprise, given the number of Mac fans around here!
>> The defintions are very clear, %d must handle an (int) sized object,
>> %ld must handle a (long) sized object, and %lld must handle any
>> long long int sized object.  Patches welcome.
> I'm finding the results autoconf comes up with on Mac OS X 10.6
> confusing.  E.g.:
> #define SIZEOF_OFF_T 8
> and sizeof(APR_INT64_T) is 8 by definition
> but
> #define APR_INT64_T_FMT "ld"
> #define APR_OFF_T_FMT "lld"
> so if INT64_T and OFF_T are the same size, why are they ending up with
> different format strings?

That confused me, too.  Doing some archaeological digging, it appears that Jim made that change
in r809745.  There's even a note in configure.in that on darwin 'long long' == 'long'.  I
do not know the rational.

View raw message