Patch Name: PHCO_27559 Patch Description: s700_800 11.11 awk(1) patch Creation Date: 02/11/18 Post Date: 02/12/05 Hardware Platforms - OS Releases: s700: 11.11 s800: 11.11 Products: N/A Filesets: OS-Core.CORE-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP Automatic Reboot?: No Status: General Release Critical: No Category Tags: defect_repair general_release Path Name: /hp-ux_patches/s700_800/11.X/PHCO_27559 Symptoms: PHCO_27559: ( SR:8606268592 CR:JAGae32830 ) Duplicate ( SR:8606276719 CR:JAGae40794 ) awk(1) reports incorrect error messages like "awk: xxxxxx cannot be used as an array" even if run on scripts that have proper array variables defined. ( SR:8606257112 CR:JAGae21422 ) In multibyte environment awk(1) recognizes some extra characters in conjunction with blank, tab and newline as default field separators. ( SR:8606212881 CR:JAGad82068 ) awk(1) doesn't recognize numbers with leading blanks in relational operations. Defect Description: PHCO_27559: ( SR:8606268592 CR:JAGae32830 ) Duplicate ( SR:8606276719 CR:JAGae40794 ) awk(1) can generate incorrect error messages due to improper internal memory management. Resolution: For proper internal memory management in awk(1), a new variable has been introduced to differentiate between active and unused (free) memory nodes. ( SR:8606257112 CR:JAGae21422 ) awk(1) documentation says that default field separators are blank, tab and newline. But for multibyte locale awk(1) recognizes other characters too as field separator. Steps: $ export LANG=ja_JP.SJIS $ echo "This i\rs\tawk t\vest" | awk '{printf("%s/%s/%s/ %s\n",$1,$2,$3,$4);}' This/i/s/awk <=== This is wrong The output should be : s/awk/t est Resolution: For multibyte locale, awk(1) used to treat the set as field separator set. Instead of this, changes have been made to check set (containing blank,\t and alternate blank characters) and newline character. ( SR:8606212881 CR:JAGad82068 ) In case any of the operands in relational operation contain leading blanks, awk(1) performs string comparison. This is true even if the operand has a numeric value, after ignoring the leading and trailing blanks. Steps: $ export UNIX95=1 $ awk 'BEGIN {a=" 0.1";if(a>0.01){print "True"}else{print "False"}}' False <=== It should print "True" $ Resolution: Changes have been made to perform string comparisons only when both the operands are strings else if any of the operands is numeric, numeric comparison is carried out. This fix is required to conform to UNIX95 standards, hence it is available only when the UNIX95 flag is set. If UNIX95 flag is unset then awk will retain the earlier behavior. Enhancement: No SR: 8606212881 8606257112 8606268592 8606276719 Patch Files: OS-Core.CORE-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64, v=HP: /usr/share/man/man1.Z/awk.1 OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /sbin/awk /usr/bin/awk what(1) Output: OS-Core.CORE-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64, v=HP: /usr/share/man/man1.Z/awk.1: None OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /sbin/awk: tran.c $Date: 2002/09/03 22:11:23 $Revision: r11.11/ 1 PATCH_11.11 (PHCO_27559) lib.c $Date: 2002/09/03 22:10:33 $Revision: r11.11/1 PATCH_11.11 (PHCO_27559) run.c $Date: 2002/10/03 01:39:03 $Revision: r11.11/2 PATCH_11.11 (PHCO_27559) $Revision: @(#) awk.sbin CUP11.11_BL2002_1118_2 PATC H_11.11 PHCO_27559 Mon Nov 18 08:14:52 PST 2002 $ $ Version_11.11 Nov 14 2002 05:35:19 $ /usr/bin/awk: tran.c $Date: 2002/09/03 22:11:23 $Revision: r11.11/ 1 PATCH_11.11 (PHCO_27559) lib.c $Date: 2002/09/03 22:10:33 $Revision: r11.11/1 PATCH_11.11 (PHCO_27559) run.c $Date: 2002/10/03 01:39:03 $Revision: r11.11/2 PATCH_11.11 (PHCO_27559) $Revision: @(#) awk CUP11.11_BL2002_1118_2 PATCH_11. 11 PHCO_27559 Mon Nov 18 08:14:06 PST 2002 $ cksum(1) Output: OS-Core.CORE-ENG-A-MAN,fr=B.11.11,fa=HP-UX_B.11.11_32/64, v=HP: 486214960 8863 /usr/share/man/man1.Z/awk.1 OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: 3993577493 405504 /sbin/awk 2562335498 135168 /usr/bin/awk Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: None Equivalent Patches: PHCO_27521: s700: 11.00 s800: 11.00 Patch Package Size: 570 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 PHCO_27559 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_27559.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_27559. 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 PHCO_27559.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_27559.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_27559.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None