IBM Support

IZ67954: AIX 6.1 TL04 ICONV( ) COREDUMP ON CODEPAGE CONVERSION APPLIES TO AIX 6100-06

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Compile a test program on AIX 5.3 using the following
    command:
    
    xlc -g iconvTest.c -L/usr/lib -liconv
    
    and run on 5.3 machine:
    $ ./a.out
    
    could not translate all characters.
    <7> Arg list too long
    
    When compile and run the same test program on 6.1 TL4
    machine:
    
    cuda$ ./a.out
    
    Inbytes left = -1014709627
    Outbytes left = -1014578681
    
    Segmentation fault(coredump)
    -----
    
    The test program runs well on aix 6.1 TL03
    
    -----
    
    Test Case:
    
    #include<iconv.h>
    
    int main(int argc, char *argv[])
    {
        iconv_t ich;
        char inbuf[256], outbuf[256];
        char *inbufptr = inbuf;
        char *outbufptr = outbuf;
        size_t inbytes_left, outbytes_left;
        int i;
        size_t translated;
    
        ich = iconv_open("UTF-8", "ISO8859-1");
        if (ich == (iconv_t)-1)
        {
            printf("iconv_open failed.\n<%d> %s\n", errno,
    strerror(errno));
            exit(1);
        }
    
        for (i = 0; i < sizeof(inbuf); i++) {
            inbuf[i] = i;
        }
    
        inbytes_left = outbytes_left = sizeof(inbuf);
        translated = iconv(ich, &inbufptr, &inbytes_left,
    &outbufptr,
    &outbytes_left);
    
        if (translated != (size_t)-1)
        {
            printf("Inbytes left = %d\n", inbytes_left);
            printf("Outbytes left = %d\n", outbytes_left);
        }
        else
        {
            printf("could not translate all characters.\n");
            printf("<%d> %s\n", errno, strerror(errno));
        }
    
        iconv_close(ich);
    }
    

Local fix

Problem summary

  • Send a ISO8859-1 string, and insize=outsize to iconv(), core
    dump may be created.
    

Problem conclusion

  • Check outbuf boundery before convert.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ67954

  • Reported component name

    AIX 610

  • Reported component ID

    5765G6200

  • Reported release

    610

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Submitted date

    2010-01-12

  • Closed date

    2010-01-12

  • Last modified date

    2013-03-29

  • APAR is sysrouted FROM one or more of the following:

    IZ67496

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    AIX 610

  • Fixed component ID

    5765G6200

Applicable component levels

  • R610 PSY U831546

       UP10/09/01 I 1000

PTF to Fileset Mapping

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSMV87","label":"AIX 6.1 Enterprise Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSMVAX","label":"AIX Express Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSAUMY","label":"IBM AIX Enterprise Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Edition":"","Line of Business":{"code":"","label":""}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG11Q","label":"AIX 6.1 HIPERS, APARs and Fixes"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
29 March 2013