Patch Name: PHSS_28302 Patch Description: s700_800 11.00 LIBCL patch Creation Date: 03/01/09 Post Date: 03/02/19 Hardware Platforms - OS Releases: s700: 11.00 s800: 11.00 Products: N/A Filesets: OS-Core.CORE-SHLIBS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP OS-Core.CORE-64SLIB,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP ProgSupport.LANG-64ALIB,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP ProgSupport.LANG-MIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP Automatic Reboot?: No Status: General Release Critical: No (superseded patches were critical) PHSS_21950: OTHER JAGad14842: Supersedes Recalled patch PHSS_20578 which, causes existing fortran executables (linked shared) to ignore it's first argument. Possibly causing wrong answers. Category Tags: defect_repair enhancement general_release critical Path Name: /hp-ux_patches/s700_800/11.X/PHSS_28302 Symptoms: PHSS_28302: JAGae48866: Enable 10.20 built applications to access files > 2GB when run on 11.X JAGae45769: Abnormal output for 0.0 using P scaling edit descriptor PHSS_27469: JAGae32868: cosd nonzero in some cases. PHSS_27106: JAGab14202: U_STACK_TRACE leaks 1360 bytes of memory JAGad90892: Not handling SIGXCPU signal JAGad89129: Implicit write cannot open unit # > 99 JAGad92163: Bad Octal representation of numbers > 4294967295 JAGae03743: PROBER in unwind lib causes stack to grow JAGae05973: Wrong conversion of hex read of 0x80000000 PHSS_25718: JAGad75314: writing to unit ID 26843546 causes crash. JAGad54112: Intrinsic function NINT produces incorrect results. JAGab19761: Defect passing CDABS and ZABS as a parameter to a function using shared libcl JAGad93863: cosd(90) should be 0.0, not 0.6123233996D-16 PHSS_24381: 1. JAGad69726: Implement M Edit descriptor for -f77 compat. 2. JAGad70835: Implement N Edit descriptor for -f77 compat. 3. JAGaa93357: shared_common memory not removed on EXIT. 4. Fixed trap unwind regression. PHSS_23699: 1. JAGad25172: Signal 11 on throw in large 64 bit aC++ program 2. JAGad51631: unformatted OPEN on text file causes FORTRAN I/O ERROR 913: OUT OF FREE SPACE 3. 'f90$ga' symbol not found in shared vesion. PHSS_22653: 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_21950: 1. JAGad14842: Patch PHSS_20578 causes existing fortran executables (linked shared) to ignore first argument. 2. JAGab77879: Memory leak will occur with Pascal or Fortran dynamic strings/arrays. (libcl.2 only) There would also be performance problems or hangs for dynamic strings/arrays and Pascal's escapecode. (libcl.1 only) PHSS_20578: 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. JAGac88664: Heap corruption when calling U_STACK_TRACE 4. JAGaa95966: f90 getarg behaves differently than f77 PHSS_19956: 1. JAGab16660: large DATA segment 2. JAGaa68257: I/O error 910 writing to file using f77 NAMELIST and file opened implicitly. 3. JAGab16656: Quad libs consuming too much DATA space 4. Unable to write files > 2GB in 64 bit mode. PHSS_16849: 1. CLLbs16318: 13 ulp error in LP64 log10 2. CLLbs16323: coshf not symmetric 3. CLLbs16322: tanhf not symmetric 4. CLLbs16310: FTN_QACOSH returns bogus values 5.CLLbs14378 The error message reported to the user when an allocate 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. 6.CLLbs16294 When the unwind library is asked to unwind the stack of code which was interrupted in the prolog of a function which has non-zero stack size and saves no GR's FR's, stack pointer return pointer the unwind library may incorrectly analyze the stack for that function causing a reference to a random memory location, and thus unexpected and incorrect behavior. While most user code will never hit this case, this corner case has been corrected in the Unwind component of libcl. PHSS_14583: 1. Support for Fortran90 Huge Data and for entry points that were updated for better performance. 2.CLLbs13395: Support for C++ Exception Handling with alloca() frames hangs. 3.CLLbs12177: U_STACK_TRACE() gets an error while unwinding from a signal handler in an ANSI C++ program that uses exception handling. If the try block is removed from the test program the stack trace / unwind works correctly 4.CLLbs13789: Unwind fails on exception frame from a function with 0 length entry PHSS_13291: 1. Fortran 90 programs terminate due to segmentation violations in the trap handling support routines which are located in libcl.sl and libcl.a. This symptom affects 64 bit Fortran 90 programs which make use of the exception handling and stack trace reporting features of the trap library (for example, by specifying the +fp_exception and +DA2.0W compiler command line options) 2. The Stack Trace feature in "libcl" fails to unwind and prints an error message referring to pre-release code upon encountering a signal context stack frame. The error message reads as follows: "Interrupt frame marker detected in pa64 be1 work. Unwinding through interrupts not yet implemented. [SIC]" 3. The stack unwind routines in "libcl" sometimes fail to unwind a stack which contains calls from one shared library to another shared library. Defect Description: PHSS_28302: JAGae48866: Enable 10.20 built applications to access files > 2GB when run on 11.X JAGae45769: Abnormal output for 0.0 using P scaling edit descriptor PHSS_27469: JAGae32868: cosd in some cases returns non zero (but close) when exactly zero is needed. This is an extention of JAGad93863, and f90 flag +trigdacc is needed to see these results. PHSS_27106: JAGab14202: U_STACK_TRACE leaks 1360 bytes of memory JAGad90892: Not handling SIGXCPU signal JAGad89129: Implicit write cannot open unit # > 99 JAGad92163: Bad Octal representation of numbers > 4294967295 JAGae03743: The stack is set up with some base address and some maximum address. For the normal 32bit case the max is the end of the data quadrant. The size between the base and max is determined by maxssiz, which is available through getrlimit(2) (RLIMIT_STACK). All the addresses between the base and the max are "valid". If we touch a valid stack address beyond the current top of the stack, we allocate physical and virtual pages around that address. Virtual pages will be allocated from the base address to the highest touched address. It doesn't look like physical pages are allocated for all those addresses, though. You'll get a SIGSEGV if you touch an address that isn't valid as defined above. JAGae05973: Wrong conversion of hex read of 0x80000000 PHSS_25718: 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. JAGab19761: Defect passing CDABS and ZABS as a parameter to a function using shared libcl 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. PHSS_24381: 1. JAGad69726: Implement M Edit descriptor for -f77 compat. 2. JAGad70835: Implement N Edit descriptor for -f77 compat. 3. JAGaa93357: cleaned up shared_common memory on EXIT. 4. Version of trap and unwind component regressed. PHSS_23699: 1. JAGad25172: workaround bug in libcl by testing if offset fits in 32 bits. Worked around in libCsup. 2. JAGad51631: re-enabled OPEN error check for unformatted access to text file. New entry point f90$ckeckuf added to support previous 11.X functionality. See +nocheckuf option in F90 for more information. 3. 'f90$ga' added to symbol export list for shared libcl, this symbol existed in archive verison since PHSS_21950. PHSS_22653: 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_21950: 1. JAGad14842: Supersedes Recalled patch PHSS_20578 which, causes existing fortran executables (linked shared) to ignore first argument. This patch replaces getargs() to it's original functionality. 2. JAGab77879: Memory leak PHSS_20578: 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. JAGac88664: Use of U_STACK_TRACE on 11.x may corrupt the heap by one byte if a string ends just over 1Kb multiples. 4. JAGaa95966: f77's getarg is "zero" based, while F90's is "one" based (the program name is indexed with "1" in F90's getarg, with "0" in f77, C/C++, and competitors). PHSS_19956: 1. JAGab16660: Declared constant data "const". Used +ESlit 2. JAGaa68257: Bad assumption when opening files implicitly 3. JAGab16656: Declared constant data "const". Used +ESlit 4. Bad I/O prototype assumptions. PHSS_16849: 1. CLLbs16318: 13 ulp error in LP64 log10 2. CLLbs16323: coshf not symmetric 3. CLLbs16322: tanhf not symmetric 4. CLLbs16310: FTN_QACOSH returns bogus values 5. CLLbs14378 The message catalog for Unwind was missing an entry. To reproduce this problem (and thus to determine 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_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. 6.CLLbs16294 The unwind library was missing logic to handle a request to "U_get_previous_frame_x" on a stack frame of a function with an entry prolog of non-zero frame size and no other saved registers. The following assembly language program duplicates the condition. When linked with the pascal program containing a handler which exercises the unwind library using pascal's Try/Recover construct a "pre-patch" libcl could possibly dump core. .level 1.1 .space $TEXT$ .subspa $CODE$ stub .proc .callinfo frame=64 .enter addito,tr -0xF,%r0,%r0 or %r0,%r0,%r0 bv %r0(%rp) ldo -20(%sp),%sp break break 0xC,0 break break 4,0 break .leave .procend .export stub .end Pascal program with handler: $literal_alias on, standard_level 'hp_modcal'$ program sigU(output); { do escape across interrupt marker for HPUX } const sigval = hex('FFFFFFFF'); var oldval, oldhndlr : integer; procedure stub; external; procedure xaritrap $alias 'XARITRAP'$(a,b : integer; \ var c,d : integer); external; procedure handle_it( instr, offset, space, \ error : integer ); begin escape(100); end; begin xaritrap( sigval, baddress(handle_it), oldval, oldhndlr); try stub; recover if escapecode = 100 then writeln('PASS') else \ writeln('fail'); end. {main} Build commands: as stub40.s pc +DA1.1 stub40.esc0.p stub40.o PHSS_14583: 1. The following is a list of new entry points: FTN_KQNINT IIDNINT IININT KIDNINT KININT The following is a list of new unsatisfied symbols in libcl. All of these are resolved in the /usr/lib/milli patch PHSS_14582. $$atan2_20 $$exp_20 $$log_20 $$vcossin_20 _U_Qfcnvxf_quad_to_sgl _U_qdfcnvfxt __SYSTEM_ID 2. CLLbs13395 The following c++ program hangs when linked archive on an HP_UX 10.20 system. #include #include extern "C" void U_STACK_TRACE(); void my_sigfunc(int sig) { printf("In my_sigfunc() with signal %d\n", sig); U_STACK_TRACE(); printf( "In my_sigfunc() with signal %d after U_STACK_TRACE.\n", sig);} int a() {U_STACK_TRACE(); return 0;} int main() { signal(SIGABRT, my_sigfunc); try { a(); raise(SIGABRT);} catch(...) {printf("fail - not legal in aCC\n");}} 3.CLLbs12177 test case. this fails a signal 6 #include #include extern "C" void U_STACK_TRACE(); void my_sigfunc(int sig) { printf("In my_sigfunc() with signal %d\n", sig); U_STACK_TRACE();} int main() {signal(SIGABRT, my_sigfunc); try {raise(SIGABRT);} catch(...) {printf("fail - not legal in aCC\n");}} 4.CLLbs13789: Trap/Unwind libraries do not unwind correctly through a trap frame generated by the first instruction of a function which has a zero length entry preamble. PHSS_13291: 1. The segmentation violation occurred when handling floating point traps. The following Fortran 90, "x.f" program reproduces the problem: PROGRAM CM110 REAL*4 A,B ON REAL*4 DIV 0 CALL TRAP A = 0.0 B = 1.0 / A PRINT *, B END SUBROUTINE TRAP(C) REAL*4 C PRINT *, 'trap' C = 0.0 RETURN END $f90 -o a64.out -g +fp_exception +DA2.0W x.f $a64.out Signal 11: segmentation violation PROCEDURE TRACEBACK: Stack_Trace: error while unwinding stack ( 0) 0xc00000000015d0a0 _sigreturn [/lib/pa20_64/libc.2] 2. When displaying a stack trace after a floating point exception, the unwind library does not display the stack frames above the exception frame and displays a "not yet implemented" message.v The following Fortran 90, program, "test.f" reproduces the problem: DOUBLE PRECISION X, Y X = 1.2345D0 X = X*1.1D0 Y = DLOG(0.0D0-X) END $ f90 +fp_exception +DA2.0W +_allow_wide_mode +Z test.f $ a.out PROGRAM ABORTED : IEEE invalid operation PROCEDURE TRACEBACK: Interrupt frame marker detected in pa64 be1 work. Unwinding through interrupts not yet implemented. 3. Programs which attempt to display a stack trace which crosses a shared library boundary (e.g. a function in "libc.sl" which called a function in "libcl.sl" fail to unwind through export stubs which are present in HP_UX 32 bit programs. The F90 program in item 2, "test.f" when compiled in 32 bit mode (+DA1.1 compiler option) reproduces the problem: $ f90 -g +DA1.1 +fp_exception test.f $ a.out PROGRAM ABORTED : IEEE invalid operation PROCEDURE TRACEBACK: Stack_Trace: error while unwinding stack ( 0) 0xc1055728 FTN_DLOG + 0x28 [/usr/lib//libcl.2] Enhancement: No (superseded patches contained enhancements) PHSS_27469: Enhancement to cosd. SR: 5003415752 8606104417 8606129759 8606145506 8606107614 8606131152 8606158078 8606200550 8606201661 8606206139 8606184910 8606224775 8606219352 8606221758 8606219988 8606223059 8606234546 8606236924 8606284924 8606281826 Patch Files: OS-Core.CORE-SHLIBS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lib/libcl.1 /usr/lib/libcl.2 /usr/lib/nls/msg/C/libcl.cat OS-Core.CORE-64SLIB,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lib/pa20_64/libcl.2 ProgSupport.LANG-64ALIB,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: /usr/lib/pa20_64/libcl.a ProgSupport.LANG-MIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lib/libcl.a what(1) Output: OS-Core.CORE-SHLIBS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lib/libcl.1: Trap Library version UX.10.20.15 - 99/12/13 Unwind Library version UX.10.20.16 - 02/09/02 libIO77 HP HPUX [ Release B.10.20.15 PA 32bit ] (hp700:hp/ux) Jan 7 2003 Copyright (c) 2001 Hewlett Packard. fs_amod.s $Revision: 1.9.1.1 $ libcl.a version B.10.29.18 - Jan 3, 2002 /usr/lib/libcl.2: Trap Library version UX.11.01.06 - 02/04/16 Unwind Library version UX.11.01.05 - 00/08/15 libIO77 HP HPUX [ Release B.11.01.15 PA 32bit ] (hp700:hp/ux) Jan 7 2003 Copyright (c) 2001 Hewlett Packard. fs_amod.s $Revision: 1.9.1.1 $ libcl.sl version B.11.01.18 - Jan 3 2003 /usr/lib/nls/msg/C/libcl.cat: None OS-Core.CORE-64SLIB,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lib/pa20_64/libcl.2: libIO77 HP HPUX [ Release B.11.01.15 PA 64bit ] (hp700:hp/ux) Jan 7 2003 Copyright (c) 2001 Hewlett Packard. libcl.sl version B.11.01.18 - Jan 3 2003 Trap Library version UX.11.01.06 - 02/04/16 Unwind Library version UX.11.01.05 - 00/08/15 ProgSupport.LANG-64ALIB,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: /usr/lib/pa20_64/libcl.a: libcl.a version B.11.01.18 - Jan 3 2003 libIO77 HP HPUX [ Release B.11.01.15 PA 64bit ] (hp700:hp/ux) Jan 7 2003 Copyright (c) 2001 Hewlett Packard. Unwind Library version UX.11.01.05 - 00/08/15 Trap Library version UX.11.01.06 - 02/04/16 ProgSupport.LANG-MIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lib/libcl.a: libcl.a version B.11.01.18 - Jan 3 2003 fs_amod.s $Revision: 1.9.1.1 $ libIO77 HP HPUX [ Release B.11.01.15 PA 32bit ] (hp700:hp/ux) Jan 7 2003 Copyright (c) 2001 Hewlett Packard. Unwind Library version UX.11.01.05 - 00/08/15 Trap Library version UX.11.01.06 - 02/04/16 cksum(1) Output: OS-Core.CORE-SHLIBS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 2576109075 1431584 /usr/lib/libcl.1 3503178130 1261568 /usr/lib/libcl.2 1025839270 21393 /usr/lib/nls/msg/C/libcl.cat OS-Core.CORE-64SLIB,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 4287015165 1072416 /usr/lib/pa20_64/libcl.2 ProgSupport.LANG-64ALIB,fr=B.11.00,fa=HP-UX_B.11.00_32/64, v=HP: 3181378881 1856578 /usr/lib/pa20_64/libcl.a ProgSupport.LANG-MIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 370291905 1475160 /usr/lib/libcl.a Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHSS_13291 PHSS_14583 PHSS_16849 PHSS_19956 PHSS_20578 PHSS_21950 PHSS_22653 PHSS_23699 PHSS_24381 PHSS_25718 PHSS_27106 PHSS_27469 Equivalent Patches: PHSS_28301: s700: 10.20 s800: 10.20 PHSS_28303: s700: 11.11 s800: 11.11 PHSS_28304: s700: 11.22 s800: 11.22 PHSS_28305: s700: 11.22 s800: 11.22 Patch Package Size: 7010 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_28302 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHSS_28302.depot By default swinstall will archive the original software in /var/adm/sw/save/PHSS_28302. If you do not wish to retain a copy of the original software, include the patch_save_files option in the swinstall command above: -x patch_save_files=false WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHSS_28302.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHSS_28302.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHSS_28302.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None