apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48476] New: apr_psprintf() does not parse the ll or hh size specifiers
Date Sat, 02 Jan 2010 21:38:18 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48476

           Summary: apr_psprintf() does not parse the ll or hh size
                    specifiers
           Product: APR
           Version: 1.3.9
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: regression
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: squasar@darkrainfall.org


Created an attachment (id=24787)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24787)
Quick patch to make things work again.

Please note: My actual OS is Mac OS X 10.6, not 10.4. Your OS dropdown could
stand to have 10.6 and 10.5 as available options.

Some heavy GDBing of a recurring Subversion crash revealed that apr_psprintf()
doesn't appear to parse the %lld specifier format correctly, which causes it
not to advance the va_list correctly, which causes it to crash in strlen() when
it tries to handle a %s format after the %lld, because it's accessing the wrong
pointer. The use of the %lld specifier is defined by APR_OFF_T_FMT on Darwin,
making it an internal inconsistency. The check in configure.in on Darwin 10
which makes it use %lld appears to be fallacious; it's definitely unnecessary.

This is a regression inasmuch as it didn't happen in 1.3.8, but the underlying
lack of support for the specifier was in 1.3.8 and still appears to be in HEAD.

To fix the issue immediately, do not use %lld as the APR_OFF_T_FMT. To fix it
correctly, modify apr_vformatter() to parse the ll size specifier. (And the hh
specifier as well).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message