Skip to main content

IV31754: XLCENTRY ABEND WITH ATOMIC KEYWORD


Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The test case makes use of the OpenMP "atomic" clause
    incorrectly but instead of giving an error message, the compiler
    abends and produces a Signal 11.
    
    
    ===== COMPILE COMMAND:
    mpixlc_r -g -O3 -qstrict -qtm -qsmp=omp:speculative -c
    atomic_bug.c
    
    
    ===== TESTCASE:
    $ cat atomic_bug.c
    #include <stdio.h>
    
    #define SIZE 400
    
    int main(void)
    {
        int v, w, z;
        int a[SIZE], b[SIZE];
    
        for (v=0; v<SIZE; v++)
        {
            a[v] = v;
            b[v] = -v;
        }
    
        #pragma omp parallel for private(v,w,z)
        for (v=0; v<SIZE; v++)
          for (w=0; w<SIZE; w++)
            for (z=0; z<SIZE; z++)
            {
              #pragma omp atomic
              {
                a[v] = a[w] + b[z];
              }
            }
    
        printf("done \n");
    
        return 0;
    }
    $
    
    
    ===== ACTUAL OUTPUT:
    $ mpixlc_r -g -O3 -qstrict -qtm -qsmp=omp:speculative -c
    atomic_bug.c
    /opt/ibmcmp/vac/bg/12.1/bin/.orig/bgxlc_r: 1501-224 (S) fatal
    error in
    /opt/ibmcmp/vac/bg/12.1/exe/xlcentry: signal 11 received
    $
    
    
    ===== EXPECTED OUTPUT:
    Compiler should not abend.
    

Local fix

  • n/a
    

Problem summary

  • USERS AFFECTED:
    People using an invalid syntax form with compound statements of
    the open mp atomic pragma are affected by this issue.
    
    PROBLEM DESCRIPTION:
    The problem is that the pragma list flag says there is a pragma
    in the list and is mismatched with the actual list that has no
    pragmas.
    This causes a null pointer dereference.
    

Problem conclusion

  • Do not use compound statements for the atomic pragma.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV31754

  • 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

    2012-11-09

  • Closed date

    2012-11-09

  • Last modified date

    2012-11-09

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

    LI76943

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

Fix information

  • Fixed component name

    XL C FOR AIX

  • Fixed component ID

    5725C7100

Applicable component levels

  • RC10 PSY U856101

       UP C

Rate this page:

(0 users)Average rating

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Rate this page:


(0 users)Average rating

Add comments

Document information

XL C for AIX

Compiler


Software version:
12.1


Reference #:
IV31754


Modified date:
2012-11-09

Translate my page

Content navigation