LI77162: 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

    LI77162

  • Reported component name

    XL C/C++ FOR LI

  • Reported component ID

    5725C7300

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-12-17

  • Closed date

    2012-12-17

  • Last modified date

    2012-12-17

  • 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/C++ FOR LI

  • Fixed component ID

    5725C7300

Applicable component levels



Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

XL C/C++ for Linux
Compiler

Software version:

12.1

Reference #:

LI77162

Modified date:

2012-12-17

Translate my page

Machine Translation

Content navigation