Patch Name: PHSS_25717 Patch Description: s700_800 10.20 LIBCL cumulative patch Creation Date: 02/02/26 Post Date: 02/03/08 Hardware Platforms - OS Releases: s700: 10.20 s800: 10.20 Products: N/A Filesets: OS-Core.CORE-SHLIBS,B.10.20 ProgSupport.LANG-MIN,B.10.20 Automatic Reboot?: No Status: General Superseded Critical: No (superseded patches were critical) PHSS_14000: OTHER Some simulation tools requires this patch for locating their code (stored in $DATA$ space). Path Name: /hp-ux_patches/s700_800/10.X/PHSS_25717 Symptoms: PHSS_25717: JAGad75314: writing to unit ID 26843546 causes crash. JAGad54112: Intrinsic function NINT produces incorrect results. JAGad93863: cosd(90) should be 0.0, not 0.6123233996D-16 JAGad50860: I/O problem (-0.0000 instead of 0.0000) PHSS_22652: 1. JAGaa93357: Calls to __F90_F_EXIT always had and exit code of 0, even when not appropriate. 2. JAGad00306: large real constants not assigned properly 3. JAGad27408: Problem with numbers starting list directed I/O streams. PHSS_21951: 1. JAGab21216: U_STACK_TRACE only unwinds the frames up to the sigreturn call, and does not display the frame of the routine that was running when the signal was caught. 2. JAGab71918: A throw or escape out of a signal handler in aC++ will likely cause an abort when used in the catch clause. 3. JAGab77879: Performance problems or hangs for F90 dynamic strings/arrays and Pascal's escapecode. PHSS_17689: 1. Fortran treats letters T, F, t, f as valid input for numeric items, instead of catching them as an error. PHSS_16690: 1. Unwinding through an invalid stack frame may not discontinue the unwinding process. The routine which finds unwind entries in the unwind table, "U_get_unwind_entry" has an "off by one" logic error in its search algorithm and could return a pointer to the address beyond the end of the unwind table indicating that it found an unwind entry instead of indicating that no entry was found. 2. The error message reported to the user when an alloca frame is encountered by U_get_previous_frame() is incorrect. "5613 Procedure entry sequence is too long for Unwind. Contact HP Service." is displayed rather than "5612 Old version data structures won't restore r3 and r4 for Alloca Unwind." Reminder: U_get_previous_frame_x() is the new 10.20 interface which permits unwinding alloca() stack frames. PHSS_15549: 1. PHSS_11658 causes FORTRAN to ignore format spec $ (newline suppression). 2. Fortran complex arithmetic is much slower with the post-Fortran90 libcl. 3. For value 0.0, ES12.3 format displays 0.000E-01, it should be 0.000E+0 4. FORTRAN I/O ERROR 979: VARIABLE NOT IN NAMELIST GROUP for variables with embedded "$" 5. FORTRAN I/O ERROR 979: VARIABLE NOT IN NAMELIST GROUP for f90 namelist IO which defines multiple array items after a single array element is specified. PHSS_15255: 1. Fortran formatted real output has a generic accuracy problem caused by sometimes rounding a formatted value twice. This can result in a formatted value that is too large. PHSS_14423: 1. If when handling an exception, the unwinder is called to unwind a stack which contains alloca frames, the stack unwind will often fail when crossing the alloca() frame. (This affects Ansi C++ exception handling which uses alloca() to allocate space for temporary variables.) 2. The unwinder may dump core when unwinding through HP_UX exception frames in shared libraries. The dumping of core is likely to happen if the user has not followed the procedure calling conventions in generating object code (examples: A 3rd party compiler, assembly functions which don't follow the HP procedure calling conventions, simulator generated code.) The unwinder dumps core rather than detecting the corrupt stack and returning a "can't unwind" return value from U_get_previous_frame(). PHSS_14000: 1. Applications which call stack unwind routines including U_get_previous_frame() may receive different description of stack frame upon reaching an invalid frame in the stack. The behavior changed with the introduction of patch PHSS_10766. 2. When using Ansi C++ exception handling support, U_STACK_TRACE fails when called from signal handler. The failure mode occures only if the handler is responding to a signal which has interrupted an HP_UX system call 3. Fortran 77 program is not terminated on the first use of "kill -1." PHSS_11658: 1. SR 16533218321 : In a Fortran program, sequential unformatted write operations with empty I/O lists results in a file that cannot be read back in. 2. In Fortran programs, the performance of formatted floating point output is, in some instances, much slower than with a 9.X release of Fortran 77. PHSS_10766: 1. Unwind library fails to cross shared library boundaries and signal frames. PHSS_10743: 1. SR 5003363085, 1653198705 : In a Fortran program an unformatted read of an unquoted character string may stop before reaching the end of the string. This happens when the string contains a quote or ':' character. 2. SR 5003360081 : A Fortran 77 program that tries to trap INTEGER*4 overflow using "ON INTEGER*4 OVERFLOW ..." will not in fact trap the overflow. PHSS_9483: 1. SR 5003324855: Unwind library doesn't work if an alloca call has been made. PHSS_8967: 1. Fails to allow access to files larger than 2 Gigabytes in size. PHSS_8966: 1. SR 5003340596 : There is a memory leak when closing files that can cause a program to run out of memory if it opens and closes files many times. 2. SR 1653187393 : A file auto-opened with a sequential read or write statement will create a file whose maximum record length is 256 bytes. PHSS_8397: 1. Use of +Oparallel and shared libraries on HPUX 10.20 results in undefined externals __FTN_SET_AR and __FTN_300CHARS. 2. Systems cannot compile Fortran 90 programs or run Fortran 90 programs that were linked with a shared libcl. 3. SR 5003330738 : Reading and writing may be much slower under HP-UX 10.20 than on earlier releases. PHSS_6986: 1. SR 5003298067 : Reading a record from an ISAM file may cause the program to crash or exhibit other symptoms of writing off the end of a dynamically allocated memory block. Whether this problem will be observed depends on exactly what other IO commands are executed both before and after the ISAM file read. 2. SR 5003298075 : Programs may crash when using a REWRITE statement to alter an existing ISAM record. The REWRITE statement is used only with ISAM files. The occurrence of this problem is highly sensitive to the pattern of allocation and deallocation of memory blocks at run-time. However, if the problem occurs it will almost certainly result in a program crash while attempting to execute the REWRITE statement; delayed symptoms or silent incorrect behavior are very unlikely. 3. SR 5003290122 : If a program backspaces over an initial 64 byte record, the file pointer will be left in the wrong position and the next access to the file will read or write the wrong location in the file. This problem only occurs with the initial record, and that record must be exactly 64 bytes long. 4. SR 5003280859 : Arrays of 4-byte integers do not work correctly with namelists if the +autodblpad compiler switch is used. Only the first element of the array will be correctly accessed via the namelist. PHSS_5691: 1. SR 4701296160 : "Ada/unwind fails on 10.0" Users of Alsys Ada will experience problems with exception handling on HP-UX 10.0 without this patch. Exceptions may not be caught by the program's handlers, or may cause core dumps. This patch is essential for all Alsys Ada users. 2. SR 4701295998 : "C++ program compiled on 9.0 dumps core on 10.0" Only affects C++ programs using exception handling. Note that this fix is also included in HP-UX release 10.01. It is mentioned here so that users of HP-UX 10.00 may obtain the patch without updating their whole system, should they so wish. Defect Description: PHSS_25717: JAGad75314: Only works on large filesystems. Added a clearer message to libIO77 when it fails at exactly 2 GiG mark JAGad54112: Increased precision of internal datatypes. JAGad93863: added new intrinsic routines for cosd(90) sin(0), and tand(180). Default behavior is old imprecise values. Use f90 flag +trigdacc (trig degree accurate) to get new alternate intrinsics. No other Source change needed. JAGad50860: I/O problem (-0.0000 instead of 0.0000) PHSS_22652: 1. JAGaa93357: Calls to __F90_F_EXIT always had and exit code of 0, even when not appropriate. 2. JAGad00306: treat large real constants like F77. 3. JAGad27408: Problem with numbers starting list directed I/O streams. PHSS_21951: 1. JAGab21216: Error in U_STACK_TRACE unwinding past 64 bit _sigreturn 2. JAGab71918: If a throw or escape is done out of a signal handler that interrupted a system call the values of the callee save registers (at least R3 and R4) may be invalid 3. JAGab77879: Performance problems or hangs for F90 dynamic strings/arrays and Pascal's escapecode. PHSS_17689: 1. T, F, t, f are logicals and were incorrectly accepted as integers. PHSS_16690: 1. The off by one error in U_get_unwind_entry() returns a bogus unwind descriptor for a pc offset (the first argument) which is higher than the highest executable pc offset in the load module. 2. The message catalog for Unwind was missing an entry. To reproduce this problem (and thus to determin whether you need the patch on your system,) use the following program. Note that this program uses short cuts which are archive library specific. It will not link shared. Just for reference, the program also demonstrates use of the new U_get_previous_frame_x interface for correct un- winding through alloca frames. #include #include typedef unsigned int address; typedef unsigned int space; main() { struct { int curr_frame_size; address curr_sp; unsigned long curr_pcspace; address curr_pcoffset; address curr_dp; address curr_rp; address curr_mrp; space curr_sr0, curr_sr4; int r3; address cur_r19; /* for PIC code */ int r4; int reserved; } cfi; struct { int prev_frame_size; address prev_sp; space prev_pcspace; address prev_pcoffset; int prev_dp; unsigned int uw_descr[2]; address ustart; address uend; int uw_index; address prev_r19; /* for PIC code */ int r3; int r4; } pfi; #ifdef NEW_INTERFACE #define UNWIND_STEP(cfi,pfi) \ U_get_previous_frame_x(&cfi,&pfi,sizeof(pfi)); #else #define UNWIND_STEP(cfi,pfi) \ U_get_previous_frame(&cfi,&pfi); #endif void *mptr; mptr = alloca(1000); U_get_frame_info(&cfi); UNWIND_STEP(cfi,pfi); copy_frame_info(&cfi,&pfi); UNWIND_STEP(cfi,pfi); } /* END */ Compile Line: cc -Ae test_alloca.c -Wl,-aarchive -lcl $a.out will display, "Procedure entry sequence is too long for Unwind. Contact HP Service." if patch PHSS_16690 has not been installed on your system. It will display "Old version data structures won't restore r3 and r4 for Alloca Unwind." if the patch has been installed. PHSS_15549: 1. SR1653242602: PHSS_11658, while fixing non-advancing IO to conform to f90 standards, makes format spec $ stop working. 2. SR1653258798: Post-f90 libcl's complex arithmetic routines were compiled without optimization. 3. SR5003407429: ES format descriptor incorrectly handled 0.0, by decreasing the printed exponent by one when it shouldn't. 4. SR5003390112: dollar signs ($) were not allowed in namelist variable names, because of an earlier change to make $end work correctly. Supporting $end is not mutually exclusive with allowing $'s in variable names as long as the $ is not the first character, and the f77 and f90 compilers do not allow names to begin with $. 5. SR5003421701: f90 uses namelist IO handling distinct from f77, in order to handle new f90 features such as array sections. The f90 implementation did not allow more than one namelist value to follow a single specified array element, which is sometimes used as a starting position for a list of values. PHSS_15255: 1. The Fortran IO library rounded the value to w+1 digits during its initial conversion from floating point to ascii, where w is the width requested in the format string. It then proceeded to round the ascii result a second time, to p digits, where p is the precision requested in the format string. Rounding should have been performed only once, to p digits, and never to w+1 digits. PHSS_14423: 1. The unwinder was not always obtaining the values of gr3 and gr4 from the appropriate locations during unwinding through exceptions which interrupted HP_UX system calls. When encountering a stack frame for an exception which interrupted the OS, the values for r3 and r4 should be obtained from the user's stack (which the unwind library tracks in it's "state_vector" data structure.) The unwind library was instead, getting these values from the signal context saved when the interrupt occurred. 2. The unwinder dumps core when unwinding exception frames in shared libraries upon getting a return pointer in protected memory. Routines which extract a return pointer from exception handler code was not checking addresses for readability prior to accessing the address triggering bus errors. PHSS_14000: 1. Applications calling U_get_previous_frame() on an invalid stack frame received different results because U_get_previous_frame() has been modified to unwind inport and export stubs on the stack which have been optimized by the linker (e.g. do not appear in the stub unwind region tables in the SOM). After U_get_previous_frame attempted to unwind a region of the stack which was not listed in unwind tables or stub unwind tables, the data structure which describes the top frame of the stack has been filled with either 1) the description of the next stack frame on the stack if the stack contained a "linker optimized" stub at its top, or otherwise, 2) garbage values if the top of the stack was an invalid frame. The original behaviour of U_get_previous_frame was to not destroy the information in the frame data structure in condition (2). 2. The Ansi C++ exception handling support was failing because the Stack Unwind routines (U_get_previous_frame) were obtaining the gr3 and gr4 register values from the signal context record, when instead it should have picked them up from the "callee saves" register storage area on the stack. The Unwind functions were not correctly handling the difference between the state saved by signals which interrupted user code from signals which interrupted HP_UX system code. 3. Use the following f77 program to verify the "kill -1" patch needs to be installed. PROGRAM toto X=0 DO WHILE (X .NE. 1000000) WRITE (*,*) 'X = ',X X = X + 1 END DO END Compile and execute the program. Issue a "kill -1 " If a second "kill -1" command is necessary, the patch is needed. PHSS_11658: 1. In a Fortran program, sequential unformatted writes with empty IO lists wrote nonsense records into the file making the file unreadable. SR 1653218321 2. The slow performance of Fortran formatted floating point output was due to the unnecessary use of quad precision computation when double precision would have sufficed. PHSS_10766: 1. The unwind library routine, "U_get_previous_frame()" and it's associated routines such as "U_STACK_TRACE()" fail to cross shared library boundaries and signal stack frames. PHSS_10743: 1. SR 5003363085, 1653198705 : The Fortran runtime library did not handle correctly certain delimiter characters when they occurred in an unquoted character string. The read should terminate only when a blank, comma, slash, or end of record is encountered. 2. SR 5003360081 : A defect in the Fortran runtime library caused INTEGER*4 traps to be interpreted as INTEGER*8 traps. Note that INTEGER*8 is supported by F90 but not by F77. PHSS_9483: 1. Calls to the unwind library routine, "U_get_previous_frame()" or it's associated routines such as "U_STACK_TRACE()" do not unwind through stacks which contain a frame in which alloca() has been used to dynamically allocate memory. PHSS_8967: 1. libcl fails to allow access to files larger than 2 Gigabytes in size. PHSS_8966: 1. Some memory was not freed when a file was closed. 2. The maximum record length was incorrectly being set when a sequential file was auto-opened. PHSS_8397: 1. The symbols __FTN_SET_AR and __FTN_300CHARS were not exported from the shared version of libcl. 2. The complete set of Fortran 90 functionality was not shipped with the 10.20 or earlier releases of HP-UX. 3. Changes were made to speed up the runtime IO system. It may still not be as fast as in HP-UX 10.01 or 10.10 due to changes for Fortran 90 but it is faster then the HP-UX 10.20 version. PHSS_6986: 1. SR 5003298067 : The problem is caused by the runtime IO library inappropriately reallocating a buffer to a smaller size. 2. SR 5003298075 : The problem was caused by an uninitialized variable in a dynamically allocated block. 3. SR 5003290122 : The defect was caused by incorrect control logic in a Fortran run-time library routine. 4. SR 5003280859 : The +autodblpad option causes integer arrays to be "padded" out to a length of 8 bytes for each array element. But the runtime library routines that implement access through a namelist treat the array as if it had not been padded. This causes accesses to all elements of the array, except to the first, to be incorrect. Either the wrong element is accessed, or some of the padding bytes are accessed. PHSS_5691: 1. SR4701296160 (a) Ada compiler incorrectly used the "sr4export" bit of unwind descriptors. (b) Unwind library for HP-UX 10.0 incorrectly handled Ada variable-sized frames and separate package bodies. 2. SR4701295998 An internal interface was changed at the 10.0 release which led to incompatibilities with some C++ programs that had been compiled on HP-UX 9.0. The problem was solved by reverting to the original interface. SR: 5003422808 1653281634 5003438473 4701380345 1653232181 5003324855 5003340596 5003330738 5003409466 1653253690 1653242602 1653258798 5003407429 5003421701 5003390112 5003415836 8606206139 8606184910 8606224775 8606181644 Patch Files: /usr/lib/libcl.1 /usr/lib/libcl.a /usr/lib/pa1.1/libcl.1 /usr/lib/pa1.1/libcl.a /usr/lib/nls/msg/C/libcl.cat what(1) Output: /usr/lib/libcl.1: Unwind Library version UX.10.20.15 - 99/12/13 Trap Library version UX.10.20.15 - 99/12/13 libIO77 HP HPUX [ Release B.10.20.12 PA 32bit ] (hp700:hp/ux) Feb 27 2002 Copyright (c) 2001 Hewlett Packard. libcl.sl version B.10.29.15 - Feb 27, 2002 /usr/lib/libcl.a: libcl.a version B.10.29.15 - Feb 27, 2002 libIO77 HP HPUX [ Release B.10.20.12 PA 32bit ] (hp700:hp/ux) Feb 27 2002 Copyright (c) 2001 Hewlett Packard. Unwind Library version UX.10.20.15 - 99/12/13 Trap Library version UX.10.20.15 - 99/12/13 /usr/lib/pa1.1/libcl.1: Trap Library version UX.10.20.15 - 99/12/13 Unwind Library version UX.10.20.15 - 99/12/13 libIO77 HP HPUX [ Release B.10.20.12 PA 32bit ] (hp700:hp/ux) Feb 27 2002 Copyright (c) 2001 Hewlett Packard. fs_amod.s $Revision: 1.9.1.1 $ libcl.sl version B.10.29.15 - Feb 27, 2002 /usr/lib/pa1.1/libcl.a: libcl.a version B.10.29.15 - Feb 27, 2002 fs_amod.s $Revision: 1.9.1.1 $ libIO77 HP HPUX [ Release B.10.20.12 PA 32bit ] (hp700:hp/ux) Feb 27 2002 Copyright (c) 2001 Hewlett Packard. Unwind Library version UX.10.20.15 - 99/12/13 Trap Library version UX.10.20.15 - 99/12/13 /usr/lib/nls/msg/C/libcl.cat: None cksum(1) Output: 374930228 1404544 /usr/lib/libcl.1 1653563937 1925596 /usr/lib/libcl.a 1218380332 1433216 /usr/lib/pa1.1/libcl.1 1478554221 1979044 /usr/lib/pa1.1/libcl.a 1905308540 28439 /usr/lib/nls/msg/C/libcl.cat Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHSS_22652 PHSS_21951 PHSS_5691 PHSS_6986 PHSS_8397 PHSS_8966 PHSS_8967 PHSS_9483 PHSS_10743 PHSS_10766 PHSS_11658 PHSS_14000 PHSS_14423 PHSS_15255 PHSS_15549 PHSS_16690 PHSS_17689 Equivalent Patches: PHSS_25718: s700: 11.00 11.10 s800: 11.00 11.10 PHSS_25719: s700: 11.11 s800: 11.11 PHSS_25720: s700: 11.20 s800: 11.20 Patch Package Size: 6680 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHSS_25717 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHSS_25717.depot By default swinstall will archive the original software in /var/adm/sw/patch/PHSS_25717. If you do not wish to retain a copy of the original software, you can create an empty file named /var/adm/sw/patch/PATCH_NOSAVE. WARNING: If this file exists when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. It is recommended that you move the PHSS_25717.text file to /var/adm/sw/patch for future reference. To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHSS_25717.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None