Patch Name: PHSS_24648 Patch Description: s700_800 11.20 unwind cumulative patch Creation Date: 01/08/27 Post Date: 01/08/27 Hardware Platforms - OS Releases: s700: 11.20 s800: 11.20 Products: N/A Filesets: OS-Core.CORE-64SLIB,fr=B.11.20,fa=HP-UX_B.11.20_64,v=HP OS-Core.CORE-SHLIBS,fr=B.11.20,fa=HP-UX_B.11.20_64,v=HP ProgSupport.C-INC,fr=B.11.20,fa=HP-UX_B.11.20_64,v=HP Automatic Reboot?: No Status: General Release Critical: No Category Tags: defect_repair general_release manual_dependencies Path Name: /hp-ux_patches/s700_800/11.X/PHSS_24648 Symptoms: PHSS_24648: JAGad77043: HP Caliper will not work correctly on 32-bit programs that perform unwinding of any kind, for example during C++ exceptions or calls to U_STACK_TRACE() and related functions. JAGad82012: global variable declarations in unwind.h need to be made file static. JAGad67961: clarify registration of memory reader and dlmodinfo callbacks in man pages and libunwind. Defect Description: PHSS_24648: JAGad77043: The problem is introduced by two main factors: 1) Introduction of the new dlmodadd() API to dld 2) Caliper itself - which relocates code to shared memory. Because of the code relocation, addresses of code and unwind information are beyond the "expected" 1GB range and have to be explicitly swizzled in order for libunwind to work. Also - because of the address range the new code is in, a unexpected sign-extension problem in libunwind has to be corrected. More info: The new API in dld allows to register code and its related unwind information to dld. Subsequent calls to dlmodinfo() return this registerd information. The addresses - for 32-bit apps - of the new code is in shared memory, which is "far away" from the original code. JAGad82012: /usr/include/unwind.h contains the following four declarations: const _Unwind_Action _UA_SEARCH_PHASE = 1; const _Unwind_Action _UA_CLEANUP_PHASE = 2; const _Unwind_Action _UA_HANDLER_FRAME = 4; const _Unwind_Action _UA_FORCE_UNWIND = 8; They need to be: static const _Unwind_Action _UA_SEARCH_PHASE = 1; static const _Unwind_Action _UA_CLEANUP_PHASE = 2; static const _Unwind_Action _UA_HANDLER_FRAME = 4; static const _Unwind_Action _UA_FORCE_UNWIND = 8; to permit multiple "C" source files to include the unwind.h header file. Without the "static" keyword, the linker emits four "Duplicate symbol" errors and terminates. JAGad67961: Documentation obliquely states that for dynamic code generators, the unwind library client can register its own dlmodinfo callback when calling _UNW_createContext in preparation for a process to do a self unwind. Libunwind's _UNW_currentContext assumes a process unwinding itself will never need to register its own dlmodinfo callback and thus nullifies the registered dlmodinfo callback when _UNW_currentContext is called. Initializing the _Unwind_Context through the setters doesn't nullify the registered dlmodinfo callback. (This is inconsistent behavior which this patch corrects via a code change. A man page clarification was submitted in June 2001.) SR: 8606207866 8606212824 8606198772 Patch Files: OS-Core.CORE-64SLIB,fr=B.11.20,fa=HP-UX_B.11.20_64,v=HP: /usr/lib/hpux64/libunwind.so.1 OS-Core.CORE-SHLIBS,fr=B.11.20,fa=HP-UX_B.11.20_64,v=HP: /usr/lib/hpux32/libunwind.so.1 ProgSupport.C-INC,fr=B.11.20,fa=HP-UX_B.11.20_64,v=HP: /usr/include/unwind.h what(1) Output: OS-Core.CORE-64SLIB,fr=B.11.20,fa=HP-UX_B.11.20_64,v=HP: /usr/lib/hpux64/libunwind.so.1: Itanium Unwind Library 27-July-2001 HP-UX/General Millicode UX.12.70 (IA64.ISV3): (MILLI - 02/22/01) OS-Core.CORE-SHLIBS,fr=B.11.20,fa=HP-UX_B.11.20_64,v=HP: /usr/lib/hpux32/libunwind.so.1: Itanium Unwind Library 27-July-2001 HP-UX/General Millicode UX.12.70 (IA64.ISV3): (MILLI - 02/22/01) ProgSupport.C-INC,fr=B.11.20,fa=HP-UX_B.11.20_64,v=HP: /usr/include/unwind.h: None cksum(1) Output: OS-Core.CORE-64SLIB,fr=B.11.20,fa=HP-UX_B.11.20_64,v=HP: 1349029470 393920 /usr/lib/hpux64/libunwind.so.1 OS-Core.CORE-SHLIBS,fr=B.11.20,fa=HP-UX_B.11.20_64,v=HP: 2116558646 367600 /usr/lib/hpux32/libunwind.so.1 ProgSupport.C-INC,fr=B.11.20,fa=HP-UX_B.11.20_64,v=HP: 4179707214 13484 /usr/include/unwind.h Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: In order for HP Caliper to work with this patch, the following patch must also be applied: * Patch number: PHSS_24469 * which relates to this CHART: libCsup - JAGad71615 - Invalid Type Conversion in libCsup Supersedes: None Equivalent Patches: None Patch Package Size: 790 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_24648 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHSS_24648.depot By default swinstall will archive the original software in /var/adm/sw/save/PHSS_24648. If you do not wish to retain a copy of the original software, use the patch_save_files option: swinstall -x autoreboot=true -x patch_match_target=true \ -x patch_save_files=false -s /tmp/PHSS_24648.depot 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_24648.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHSS_24648.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHSS_24648.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None