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 47044] New: [Patch] apr_snprintf.c compile failure on AIX maintainer_mode with xlc_r v7.0
Date Fri, 17 Apr 2009 12:26:51 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47044

           Summary: [Patch] apr_snprintf.c compile failure on AIX
                    maintainer_mode with xlc_r v7.0
           Product: APR
           Version: HEAD
          Platform: PC
        OS/Version: AIX
            Status: NEW
          Keywords: PatchAvailable
          Severity: normal
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: poirier@pobox.com


Created an attachment (id=23503)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23503)
Patch to fix compile error

Compile fails on AIX when configured with "--enable-maintainer-mode" and using
compiler xlc_r "@(#) IBM XL C/C++ Enterprise Edition V7.0":

"strings/apr_snprintf.c", line 580.31: 1506-1298 (S) The subscript 10 is out of
range. The valid range is 0 to 9.

and about a dozen more lines.

The error occurs where the address of an array element past the end of the
array is taken.  

Changing the code from &array[LENGTH] to array+LENGTH quiets the compile error,
and should be equivalent in function.  With the change it still compiles fine
on Linux; haven't tried elsewhere.

Patch attached.

-- 
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