IBM Support

IV64517: INCORRECT DEBUG INFO FOR VARIABLE LENGTH ARRAY

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Debug information generated for variable length arrays is
    incorrect.  When using a debugger to look at variable length
    array values, incorrect data is output.
    
    
       ===  TEST CASE  ===
    
    #include <stdio.h>
    #include <memory.h>
    #include <string.h>
    
    int main()
    {
         char CCC[strlen("11111111")];
    
         memset(CCC, 0, sizeof(CCC));
         sprintf(CCC, "abcdef");
    
         return 0;
    }
    
    
    $ dbx test_case
    reading symbolic information ...
    (dbx) stop in main
    (dbx) run
    ...
    stopped in main at line 9
        9        sprintf(CCC, "abcdef");
    (dbx) step
    (dbx) p CCC
    "/&#65429;"
    (dbx)
    

Local fix

Problem summary

  • PROBLEM DESCRIPTION:
    Debug information for variable length arrays - both stabstrings
    and DWARF - is incorrect, and not recognized by debuggers.
    
    USERS AFFECTED:
    Users wishing to debug variable length arrays using -g
    generated debug information.
    

Problem conclusion

  • The debug information generated was corrected, and variable
    length arrays are now recognized by debuggers correctly.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV64517

  • Reported component name

    XL C FOR AIX

  • Reported component ID

    5725C7100

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-09-03

  • Closed date

    2014-10-23

  • Last modified date

    2014-10-23

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

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

    IV67979 LI78469

Fix information

  • Fixed component name

    XL C FOR AIX

  • Fixed component ID

    5725C7100

Applicable component levels



Document information

More support for: XL C for AIX
Compiler

Software version: 12.1

Reference #: IV64517

Modified date: 23 October 2014