IBM Support

PI83831: COMPUTE SENTENCE CREATES A CORE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The following testcase abends at runtime for certain input
    values.
    
    ===== COMPILE COMMAND:
    $export COBLSTDIR="."
    $cob2 -q64 ?g -q"size(12000000)" -q"arith(extend)" -qnosequence
    -q"pgmname(mixed)" -q"srcformat(extend)" -c test.cbl
    $cob2 -q64 -qnosequence -bnoquiet -o a.out test.o
    
    $ cat test.cbl
    IDENTIFICATION DIVISION.
          *************************
    
           PROGRAM-ID.             "test".
    
    
           ENVIRONMENT DIVISION.
          **********************
    
           CONFIGURATION SECTION.
          ***********************
    
           SPECIAL-NAMES.
               DECIMAL-POINT     IS COMMA.
    
           INPUT-OUTPUT SECTION.
          **********************
    
           FILE-CONTROL.
          *************
    
           DATA DIVISION.
          **************
    
           FILE SECTION.
          *************
    
           WORKING-STORAGE SECTION.
          *************************
    
           01  W-COEFICIENTE                 PIC 9(2)V9(16) VALUE
    ZEROS.
    
           01  WP615-T3VALOR                 PIC 9(16)V9(09).
           01  RILD-NUMVALD9                 PIC 9(16)V9(09).
           01  WP615-NUMVAL-RTS              PIC 9(16)V9(09).
    
    
           LINKAGE SECTION.
          *****************
    
           PROCEDURE DIVISION.
          ********************
    
               DISPLAY '--> With these values, it works... '.
    
               MOVE 70520000                   TO WP615-T3VALOR
               MOVE 413632000                  TO RILD-NUMVALD9
               MOVE 314000000                  TO WP615-NUMVAL-RTS
    
               DISPLAY '--> WP615-T3VALOR...: ' WP615-T3VALOR
               DISPLAY '--> RILD-NUMVALD9...: ' RILD-NUMVALD9
               DISPLAY '--> WP615-NUMVAL-RTS: ' WP615-NUMVAL-RTS
    
               COMPUTE W-COEFICIENTE ROUNDED = WP615-T3VALOR /
                                              (RILD-NUMVALD9 -
    WP615-NUMVAL-RTS)
    
               DISPLAY '--> W-COEFICIENTE: ' W-COEFICIENTE.
    
               DISPLAY '--> With these values, it doesnt works...'.
    
               MOVE 70520000                   TO WP615-T3VALOR
               MOVE 413632000                  TO RILD-NUMVALD9
               MOVE 315000000                  TO WP615-NUMVAL-RTS
    
               DISPLAY '--> WP615-T3VALOR...: ' WP615-T3VALOR
               DISPLAY '--> RILD-NUMVALD9...: ' RILD-NUMVALD9
               DISPLAY '--> WP615-NUMVAL-RTS: ' WP615-NUMVAL-RTS
    
               COMPUTE W-COEFICIENTE ROUNDED = WP615-T3VALOR /
                                              (RILD-NUMVALD9 -
    WP615-NUMVAL-RTS)
    
               DISPLAY '--> W-COEFICIENTE: ' W-COEFICIENTE.
    
               STOP RUN.
    
    
    
    ===== ACTUAL OUTPUT:
    $ ./a.out
    --> With these values, it works...
    --> WP615-T3VALOR...: 0000000070520000000000000
    --> RILD-NUMVALD9...: 0000000413632000000000000
    --> WP615-NUMVAL-RTS: 0000000314000000000000000
    --> W-COEFICIENTE: 007078047213746587
    --> With these values, it doesnt works...
    --> WP615-T3VALOR...: 0000000070520000000000000
    --> RILD-NUMVALD9...: 0000000413632000000000000
    --> WP615-NUMVAL-RTS: 0000000315000000000000000
    <Thread 1>
    <Thread 1>  Traceback:
    <Thread 1>    Offset 0x00000624 in procedure writeERRmsg
    <Thread 1>    Offset 0x00000044 in procedure iwzWriteERRmsg
    <Thread 1>    Offset 0x00000138 in procedure
    _iwzcBCD_CONV_Pckd_To_ZndUS
    <Thread 1>    Offset 0x000009e0 in procedure ptgnb008, near line
    85 in file test.cbl
    <Thread 1>    --- End of call chain ---
    IWZ903S  The system detected a data exception.
    IWZ901S  Program exits due to severe or critical error.
    
    Abort
    $
    
    
    ===== EXPECTED OUTPUT:
    The second case should not abend.
    

Local fix

  • N/A
    

Problem summary

  • USERS AFFECTED:
    Clients who use COMPUTE in their COBOL programs may be affected
    by this issue
    
    PROBLEM DESCRIPTION:
    The runtime routine _iwzcBCD_DIV_Pckd was incorrectly aligning
    certain values that would lead to a segfault.
    

Problem conclusion

  • The rutnime routine has been corrected to prevent the incorrect
    alignment.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI83831

  • Reported component name

    COBOL AIX RUNTI

  • Reported component ID

    5724Z8702

  • Reported release

    411

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-06-29

  • Closed date

    2017-09-05

  • Last modified date

    2017-09-05

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

    PI83822

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

Fix information

  • Fixed component name

    COBOL AIX RUNTI

  • Fixed component ID

    5724Z8702

Applicable component levels

  • R411 PSY

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SS6SGM","label":"COBOL for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"411","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
19 October 2021