A fix is available
APAR status
Closed as program error.
Error description
When setting up and using a WTO __asm instruction, similar to the reentrancy example in: https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com. ibm.zos.v2r1.ccrug00/asmmacrospec.htm , a variable called 'parmList' is created using the list form of the WTO instruction, defined to DS:128 in size: =============================== __asm("listmsg1 WTO 'hello world',MF=L": "DS:128"(listmsg1)); static void test() { __asm("parmList WTO 'hello world',MF=L" :"DS:128"(parmList)); parmList = listmsg1; __asm( " WTO MF=(E,(%0)) " : : "r"(&parmList)); } =============================== Elsewhere in the same source, a simple 4 byte struct is also called 'parmList', unrelated to the WTO 'parmList' variable: =============================== typedef struct TestStruct { int value; } MyStruct; .... static void test2() { MyStruct parmList; =============================== When the program does a sizeof() for the struct 'parmList' variable, the code is incorrectly returning the 128 byte size from the WTO DS:128. From the compiler LIST/-qlist listing output: =============================== * * * C R O S S R E F E R E N C E L I S T I N G * * * IDENTIFIER DEFINITION ATTRIBUTES parmList 23-0:23 Class = parameter, Length = 4 Type = pointer to struct TestPlist_tag in function test3 24-0:24 vvvvvvvv <--- INCORRECT SIZE FOR THIS STRUCT --> vvv parmList 30-0:30 Class = auto, Length = 128 Type = struct TestPlist_tag in function test2 35-0:35, 36-0:36 parmList 12-0:12 Class = auto, Length = 128 Type = struct __ASM_DS_128 in function test 13-0:13, 15-0:15 ===============================
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: zOS XLC users with inline asm statements * * defining data and with reused names. * **************************************************************** * PROBLEM DESCRIPTION: Local data using the same name as * * other ASM defined data ended up giving * * the other ASM data size as the result * * of sizeof. * **************************************************************** * RECOMMENDATION: * **************************************************************** .
Problem conclusion
Apply provided service.
Temporary fix
Comments
APAR Information
APAR number
PI57057
Reported component name
C/C++ FOR MVS
Reported component ID
56551210A
Reported release
791
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2016-02-12
Closed date
2016-02-12
Last modified date
2016-06-04
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
CCNEP
Fix information
Fixed component name
C/C++ FOR MVS
Fixed component ID
56551210A
Applicable component levels
R791 PSY UI35376
UP16/03/10 P F603
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"791","Edition":"","Line of Business":{"code":"","label":""}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSQKCWV","label":"IBM C\/C++ for MVS\/ESA"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"791","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]
Document Information
Modified date:
22 August 2024