IBM Support

IJ34806: -QCHECK=UNSET NOT WORKING FOR STRUCT BITFIELDS

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • When using the -qcheck=unset compile option with source code
    using struct bitfields, an invalid runtime trap exception is
    thrown, incorrectly implying a use-before-set code scenario.
    
    
    
       === TEST CASE ===
    
    #include <stdio.h>
    
    struct myStruct {
      unsigned value : 16;
    };
    
    int main()
    {
        struct myStruct init;
    
        init.value = 2019;
        printf("init.value=%u\n", init.value);
    
        return 0;
    }
    
    
    $ xlc apar.c   -qcheck=unset
    $ ./a.out
    Trace/BPT trap (core dumped)
    $
    

Local fix

  • Do not use -qcheck=unset
    

Problem summary

  • PROBLEM DESCRIPTION:
    Invalid check is done for bitfield containers in a struct.
    
    USERS AFFECTED:
    Builds using -qcheck=unset with source code containing bitfields
    

Problem conclusion

  • Invalid check was removed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IJ34806

  • Reported component name

    XL C/C++ FOR AI

  • Reported component ID

    5725C7200

  • Reported release

    G10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-09-07

  • Closed date

    2021-12-13

  • Last modified date

    2021-12-13

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

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

Fix information

  • Fixed component name

    XL C/C++ FOR AI

  • Fixed component ID

    5725C7200

Applicable component levels

[{"Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"G10"}]

Document Information

Modified date:
14 December 2021