PJ40865: OPR-4 IN DATA COLLECTION 13/05/22 PTF PECHANGE

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.

Problem summary

APAR NUMBER: PJ40865
PRODUCT: z/TPF
FUNCTIONAL AREA: DATA COLLECTION
SHIPPED IN PUT: 10
ABSTRACT:
An OPR-4 or CTL-1 dump from CCDCOL may occur while running data
collection.
PACKAGE CONTENTS:
Source Segments:
(C) base/cp/chsz.cpy
Object Only Binaries:
None.
Configuration Independent Binaries:
None.
Support Files:
None.
OTHER BINARIES TO BUILD: YES
(C) <sys>/obj/ccnucl.o
(C) <sys>/load/CPS0.so
COMMENTS:
When data collection is running, the low core hooks in CCHOOK
are used to record program enters and backs. The CHK3_DACOL_EXT
hook is used to record a C language function return. The
CHK3_DACOL_EXT hook compares the stack frame to the cross
module stack frame pointer (CE3CMSTK) to determine whether the
function return is returning to a function within the same load
module or to an external load module. If the stack frame is
equal to CE3CMSTK, data collection assumes that this is a
return to an external load module and this function return is
recorded. If the function return is recorded, the PAT slot of
the shared object that is being returned to is obtained from
field ICST_PAT in the cross module stack frame.
The problem is that cross module stack frame pointer (CE3CMSTK)
is not initialized when an ECB is created. CE3CMSTK is set on
the first call to a C program. However, certain libraries such
as CTAL have a special linkage that does not set CE3CMSTK. If
the ECB enters an assembler program and this assembler program
does a CALLC to a function in CTAL, CE3CMSTK will not be set.
In this case CE3CMSTK has garbage in it. If CTAL does a call to
another function within CTAL, the PAT address is not saved in
ICST_PAT. On return from the second function within CTAL, if
the current stack frame is equal to the contents in CE3CMSTK,
CHK3_DACOL_EXT will assume that this is a function return to an
external load module. It will load the PAT address into R7 from
ICST_PAT, which is not initialized. At this point, R7 has
garbage in it. As a result, when CCDCOL attempts to use the PAT
pointed to by R7 an OPR-4 or CTL-1 dump may occur. This OPR-4
or CTL-1 dump may be accompanied by a CTL-572 dump.