A fix is available
APAR status
Closed as program error.
Error description
TRSQ - ADDITIONAL C/C++ CHANGES
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: Users of C/C++ and any of the following: * * 1. Applications that call fgets() * * 2. Header file <uchar.h> * * 3. Applications that open a member of a PDS * * for reading and type=blocked * * 4. Applications that reposition within a * * dataset opened for reading and * * type=blocked * * 5. C++ applications that use try, throw * * and catch * **************************************************************** * PROBLEM DESCRIPTION: 1. The fgets() function does not * * return NULL for any errors that * * occur on the read if some data has * * been read. * * 2. Compile fails when compile option * * LANGLVL(EXTC1X) is used and header * * file <uchar.h> is included first * * because the type size_t is not * * defined before it is used. * * 3. For a member of a PDS opened with * * type=blocked, the fread() function * * returned data from the next member * * in the PDS when called after EOF was * * reached. * * 4. For a dataset opened with * * type=blocked, the fread() function * * returned data from the last block * * when called after an initial fseek() * * failed because the new location was * * before the beginning of the file and * * a second fseek() set the new * * position at end of file. * * 5. Abend 0C4 occurred in __ds_prev() * * when called during catch clean up. * * The input DSA address was no longer * * on the backchain. * **************************************************************** * RECOMMENDATION: * **************************************************************** See Problem Description.
Problem conclusion
1. The fgets() function will return NULL for errors on the read, unless a partial read occurred on I/O to a PIPE or FIFO and errno is set to EAGAIN (which implies the stream was opened with O_NONBLOCK). 2. The header file uchar.h was changed to ensure that the type size_t is defined before it is used. 3. Code was changed to ensure that data in another member is not read. 4. Code was changed to restore the position when fseek() fails because the new location is before the beginning of the file. 5. Code was changed to ensure that catch clean up always calls __dsa_pr() with a DSA address that is on the backchain.
Temporary fix
Comments
APAR Information
APAR number
PM87642
Reported component name
LE C LIBRARY
Reported component ID
568819805
Reported release
790
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2013-04-23
Closed date
2013-08-07
Last modified date
2013-09-03
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UK96504
Modules/Macros
CELHEXPT CELHGETS CELHOSRD CELHOSSK CELHP131 CELJGETS CELQEXPT CELQGETS CELQOSRD CELQOSSK CELQP131 CELZGETS EDCBP131 EDC4H0AE EDC400B5 EDC40021 EDC4003B EDC40039
Fix information
Fixed component name
LE C LIBRARY
Fixed component ID
568819805
Applicable component levels
R790 PSY UK96504
UP13/08/21 P F308
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":"BU048","label":"IBM Software"},"Product":{"code":"SSCVSBD","label":"Runtime"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"790","Edition":"","Line of Business":{"code":"","label":""}},{"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":"790","Edition":"","Line of Business":{"code":"","label":""}},{"Business Unit":{"code":null,"label":null},"Product":{"code":"SG19O","label":"APARs - MVS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"790","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
03 September 2013