Patch Name: PHSS_14507 Patch Description: s700_800 10.01-10 LIBCL cumulative patch Creation Date: 98/03/04 Post Date: 98/04/22 Hardware Platforms - OS Releases: s700: 10.01 10.10 s800: 10.01 10.10 Products: N/A Filesets: OS-Core.CORE-SHLIBS,B.10.20 ProgSupport.LANG-MIN,B.10.20 Automatic Reboot?: No Status: General Release Critical: No Path Name: /hp-ux_patches/s700_800/10.X/PHSS_14507 Symptoms: PHSS_14507: 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(). 3. 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. 4. 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 5. Fortran 77 program is not terminated on the first use of "kill -1." PHSS_11657: 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_10742: 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_9482: 1. SR 5003324855: Unwind library doesn't work if an alloca call has been made. 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_14507: 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. 3. 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). 4. 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. 5. 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_11657: 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_10742: 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_9482: 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_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: 4701380345 1653232181 5003324855 5003340596 5003330738 5003409466 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 UX.10.20.12 - Wed 98/04/01 Trap Library UX.10.20.10 - Mon 03/09/98 libcl.sl 10.20 version B.10.29.04 03/03/98 /usr/lib/libcl.a: libcl.a 10.20 version B.10.29.04 03/03/98 Unwind Library UX.10.20.12 - Wed 98/04/01 Trap Library UX.10.20.10 - Mon 03/09/98 /usr/lib/pa1.1/libcl.1: Trap Library UX.10.20.10 - Mon 03/09/98 Unwind Library UX.10.20.12 - Wed 98/04/01 fs_amod.s $Revision: 1.9.1.1 $ libcl.sl 10.20 version B.10.29.04 03/03/98 /usr/lib/pa1.1/libcl.a: libcl.a 10.20 version B.10.29.04 03/03/98 fs_amod.s $Revision: 1.9.1.1 $ Unwind Library UX.10.20.12 - Wed 98/04/01 Trap Library UX.10.20.10 - Mon 03/09/98 /usr/lib/nls/msg/C/libcl.cat: None cksum(1) Output: 1406305080 1113776 /usr/lib/pa1.1/libcl.1 1707776361 1382416 /usr/lib/pa1.1/libcl.a 1854961028 1080777 /usr/lib/libcl.1 392973007 1327296 /usr/lib/libcl.a 1749357884 28251 /usr/lib/nls/msg/C/libcl.cat Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHSS_5691 PHSS_6986 PHSS_8397 PHSS_8966 PHSS_9482 PHSS_10742 PHSS_11657 Equivalent Patches: PHSS_14423: s700: 10.20 s800: 10.20 Patch Package Size: 4880 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_14507 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHSS_14507.depot 5b. For a homogeneous NFS Diskless cluster run swcluster on the server to install the patch on the server and the clients: swcluster -i -b This will invoke swcluster in the interactive mode and force all clients to be shut down. WARNING: All cluster clients must be shut down prior to the patch installation. Installing the patch while the clients are booted is unsupported and can lead to serious problems. The swcluster command will invoke an swinstall session in which you must specify: alternate root path - default is /export/shared_root/OS_700 source depot path - /tmp/PHSS_14507.depot To complete the installation, select the patch by choosing "Actions -> Match What Target Has" and then "Actions -> Install" from the Menubar. 5c. For a heterogeneous NFS Diskless cluster: - run swinstall on the server as in step 5a to install the patch on the cluster server. - run swcluster on the server as in step 5b to install the patch on the cluster clients. By default swinstall will archive the original software in /var/adm/sw/patch/PHSS_14507. 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_14507.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_14507.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None