incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-673) [IBM XLC++ 9.0/AIX 5.3] 0.printf fails with assertions
Date Wed, 05 Dec 2007 02:33:43 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548517
] 

Travis Vitek commented on STDCXX-673:
-------------------------------------

The last four failures happen because the config test LIMITS.cpp defines _RWSTD_INT8_T to
`char', which happens to be an unsigned type. Here are the failing test lines...

    TEST ("%{I8d}",  128, 0, 0, "-128");
    TEST ("%{I8d}",  255, 0, 0, "-1");
    TEST ("%{I8d}",   -1, 0, 0, "-1");
    TEST ("%{I8d}", -128, 0, 0, "-128");

In _rw_fmtinteger(), the value to print is cast to an _RWSTD_INT8_T. In the first case, 128
is cast to a [unsigned] char, which leaves the value 128.

I don't believe that this was the intent. I thought that all of the _RWSTD_INT*_T types are
intended to match the requirements of the C99 types `int*_t'. According to 7.18.1.1 p1 of
the C99 standard, `int8_t' denotes a signed integer type with a width of exactly 8 bits. Given
this, I think that the LIMITS.cpp config test is incorrect and should always define types
as either signed or unsigned. The README indicates that it was the intent for the types to
always be explicitly signed or unsigned, but the implementation does not match. I'm not sure
why this is, but it appears that someone was careful to write code to only add the `signed'
qualifier if the type of `char' is actually signed.

> [IBM XLC++ 9.0/AIX 5.3] 0.printf fails with assertions
> ------------------------------------------------------
>
>                 Key: STDCXX-673
>                 URL: https://issues.apache.org/jira/browse/STDCXX-673
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Test Driver
>    Affects Versions: 4.2.0
>            Reporter: Travis Vitek
>            Assignee: Travis Vitek
>            Priority: Minor
>             Fix For: 4.2.1
>
>
> extension: "%{N}" buffer size
> /amd/devco/vitek/stdcxx/trunk/tests/src/printf.cpp:1022: rw_vasnprintf(ffffffffffff8d0,
ffffffffffff8d8, "foo", va_list) error: errno = 12: Not enough space
> /amd/devco/vitek/stdcxx/trunk/tests/src/printf.cpp:1022: rw_vasnprintf(ffffffffffff8d0,
ffffffffffff8d8, "foo", va_list) error: errno = 12: Not enough space
> /amd/devco/vitek/stdcxx/trunk/tests/src/printf.cpp:1022: rw_vasnprintf(ffffffffffff8d0,
ffffffffffff8d8, "foo", va_list) error: errno = 12: Not enough space
> /amd/devco/vitek/stdcxx/trunk/tests/src/printf.cpp:1022: rw_vasnprintf(ffffffffffff8d0,
ffffffffffff8d8, "foo", va_list) error: errno = 12: Not enough space
> /amd/devco/vitek/stdcxx/trunk/tests/src/printf.cpp:1022: rw_vasnprintf(ffffffffffff8d0,
ffffffffffff8d8, "bar", va_list) error: errno = 12: Not enough space
> /amd/devco/vitek/stdcxx/trunk/tests/src/printf.cpp:1022: rw_vasnprintf(ffffffffffff8d0,
ffffffffffff8d8, "bar", va_list) error: errno = 12: Not enough space
> /amd/devco/vitek/stdcxx/trunk/tests/src/printf.cpp:1022: rw_vasnprintf(ffffffffffff8d0,
ffffffffffff8d8, "bar", va_list) error: errno = 12: Not enough space
> /amd/devco/vitek/stdcxx/trunk/tests/src/printf.cpp:1022: rw_vasnprintf(ffffffffffff8d0,
ffffffffffff8d8, "bar", va_list) error: errno = 12: Not enough space
> extension: "%{@}" nested format directive
> malformed directives
> Failed 8 out of 1572 assertions.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message