Patch Name: PHCO_26021 Patch Description: s700_800 11.00 ex(1),vi(1) cumulative patch Creation Date: 02/03/31 Post Date: 02/04/04 Hardware Platforms - OS Releases: s700: 11.00 s800: 11.00 Products: N/A Filesets: TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP Automatic Reboot?: No Status: General Release Critical: Yes PHCO_26021: ABORT CORRUPTION Category Tags: defect_repair general_release critical halts_system corruption Path Name: /hp-ux_patches/s700_800/11.X/PHCO_26021 Symptoms: PHCO_26021: 1.vi(1) dumping core when returning from background. 2.If the user resizes the window , while a large data file is still being opened by vi(1),data corruption is noticed. 3.If the user resizes the window, while '/' search is being done in vi(1) session,data corruption is noticed. PHCO_22229: 1. The exrecover functionality corrected. 2. vi(1) cannot handle tags longer than 30 characters. 3. vi(1) shows improper pattern matching for multi-byte locales. 4. vi(1) does not handle window size change signal (SIGWINCH) in case of piped commands. 5. Line number information was not being reset whenever a fresh file was being opened after alternation between files for e# command. PHCO_13828: 1. Word anchoring in global substitution not handled correctly. vi fails for the specific case - g/\/s//globals/g 2. vi command reports incorrect number of characters for multibyte locales. Defect Description: PHCO_26021: 1.vi(1) is dumping because of improper handling of SIGCONT signal. According to XPG4 standards when vi get SIGCONT signal, vi has to redraw the screen. To support this a handler is introduced for SIGCONT. When vi gets ctrl-z, it receives SIGTSTP signal and the process is stopped. Now when it receives SIGCONT (through fg or jobs) vi(1) is trying to redraw the screen and dumping core, instead of just continuing with the process. The problem can reproduced in the following way: - Execute vi - Press +q in the same time ie., type Q - You will see a ':' in the bottom line. Type +z in the same time. - vi stops executing and you will see shell prompt. - Now give fg on the command line , you see the vi(1) comes out with a floating exception(coredump) Resolution: The fix is to set DEFAULT (SIG_DFL) handler for SIGCONT signal in the handler for SIGTSTP. So that when vi(1) gets SIGCONT after SIGTSTP, it will just continue with the process. 2.If window is resized while vi(1) is loading a huge file,data in the file gets corrupted when the file is saved.This was because of improper handling of SIGWINCH signal in vi(1) while loading a file. The problem can reproduced in the following way: - Create the file "data1" which is more than 2MB size. - Copy the "data1" file into "data2" - vi the "data1" file in an hpterm. - While loading the file, resize the window. - Save and quit from vi. - Now take the diff of two files(data1,data2).There will be difference between the above two files. Resolution: The code has been changed to handle SIGWINCH properly while a data file is being loaded. 3.If window is resized while a '/' search command is performed on data file , data in the file gets corrupted when the file is saved. This was because of improper handling of SIGWINCH signal in vi(1) during pattern searching. The problem can be reproduced as follows: - Create a file temp1 with > 1000000 lines. Copy temp1 to temp2. - Search for a particular pattern which is not present in the file or one which is present but towards the end of the file so that the search operation takes time. - Resize the terminal while the search is taking place. Wait until the search operation is over. - Save and quit from vi. - Now take the diff of two files(temp1,temp2).There will be difference between the above two files. temp1 & temp2. Resolution: The code has been modified to handle SIGWINCH properly while a '/' search command is performed in vi(1) session. PHCO_22229: 1. exrecover(1) functionality corrected. Resolution: The code has been modified to take care of the same. 2. vi(1) cannot handle tags longer than 30 characters, because the maximum tag size is 30. Resolution: Now the code is modified to handle the tags up to 254 characters. 3. vi(1) is not matching the patterns properly in case of multi-byte locales, because vi(1) is not substituting the newline in a multi-byte locale. Resolution: The code has been modified to take care of the newline substitution in case of multi-byte locales. 4. The signal handler for "SIGWINCH" was not activated for piped commands to vi(1). Resolution: Now the code is modified to take care of signal handler for SIGWINCH while piping. 5. The vi(1) behaves differently between 9.X and 10.X with e# command, because line number information was not being reset whenever a fresh file was being opened after alternation between files . Resolution: Now the code has been modified to reset the line number information properly when a fresh file was being opened after alternation between files. PHCO_13828: 1. Word anchoring in global substitution causes a loss of punctuation and white space. vi does not recognize that punctuation and white space are not part of a word. vi fails for the specific case - g/\/s//globals/g 2. vi command reports incorrect number of characters for multibyte locales. vi used to report the number of bytes instead of the number of characters in the file. SR: 1653251850 8606187176 8606229299 8606156264 8606100309 4701385112 1653249524 1653251314 1653240234 4701379339 5003398289 Patch Files: TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/bin/e /usr/bin/edit /usr/bin/ex /usr/bin/vedit /usr/bin/vi /usr/bin/view /usr/lib/nls/msg/C/exrecover.cat /usr/lbin/exrecover /usr/lbin/expreserve what(1) Output: TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/bin/e: $Revision: 82.6.1.21 $ 32-bit NLS $ PATCH_11_00: hpux_rel.o ex.o ex_addr.o ex_cmds.o ex_ cmds2.o ex_cmdsub.o ex_data.o ex_extern.o ex _get.o ex_io.o ex_put.o ex_re.o ex_rldata.o ex_set.o ex_subr.o ex_temp.o ex_tty.o ex_uni x.o ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex _voper.o ex_vops.o ex_vops2.o ex_vops3.o ex_ vput.o ex_vwind.o printf.o bcopy.o ex_crypt. o 02/03/31 TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/bin/edit: $Revision: 82.6.1.21 $ 32-bit NLS $ PATCH_11_00: hpux_rel.o ex.o ex_addr.o ex_cmds.o ex_ cmds2.o ex_cmdsub.o ex_data.o ex_extern.o ex _get.o ex_io.o ex_put.o ex_re.o ex_rldata.o ex_set.o ex_subr.o ex_temp.o ex_tty.o ex_uni x.o ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex _voper.o ex_vops.o ex_vops2.o ex_vops3.o ex_ vput.o ex_vwind.o printf.o bcopy.o ex_crypt. o 02/03/31 TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/bin/ex: $Revision: 82.6.1.21 $ 32-bit NLS $ PATCH_11_00: hpux_rel.o ex.o ex_addr.o ex_cmds.o ex_ cmds2.o ex_cmdsub.o ex_data.o ex_extern.o ex _get.o ex_io.o ex_put.o ex_re.o ex_rldata.o ex_set.o ex_subr.o ex_temp.o ex_tty.o ex_uni x.o ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex _voper.o ex_vops.o ex_vops2.o ex_vops3.o ex_ vput.o ex_vwind.o printf.o bcopy.o ex_crypt. o 02/03/31 TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/bin/vedit: $Revision: 82.6.1.21 $ 32-bit NLS $ PATCH_11_00: hpux_rel.o ex.o ex_addr.o ex_cmds.o ex_ cmds2.o ex_cmdsub.o ex_data.o ex_extern.o ex _get.o ex_io.o ex_put.o ex_re.o ex_rldata.o ex_set.o ex_subr.o ex_temp.o ex_tty.o ex_uni x.o ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex _voper.o ex_vops.o ex_vops2.o ex_vops3.o ex_ vput.o ex_vwind.o printf.o bcopy.o ex_crypt. o 02/03/31 TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/bin/vi: $Revision: 82.6.1.21 $ 32-bit NLS $ PATCH_11_00: hpux_rel.o ex.o ex_addr.o ex_cmds.o ex_ cmds2.o ex_cmdsub.o ex_data.o ex_extern.o ex _get.o ex_io.o ex_put.o ex_re.o ex_rldata.o ex_set.o ex_subr.o ex_temp.o ex_tty.o ex_uni x.o ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex _voper.o ex_vops.o ex_vops2.o ex_vops3.o ex_ vput.o ex_vwind.o printf.o bcopy.o ex_crypt. o 02/03/31 TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/bin/view: $Revision: 82.6.1.21 $ 32-bit NLS $ PATCH_11_00: hpux_rel.o ex.o ex_addr.o ex_cmds.o ex_ cmds2.o ex_cmdsub.o ex_data.o ex_extern.o ex _get.o ex_io.o ex_put.o ex_re.o ex_rldata.o ex_set.o ex_subr.o ex_temp.o ex_tty.o ex_uni x.o ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex _voper.o ex_vops.o ex_vops2.o ex_vops3.o ex_ vput.o ex_vwind.o printf.o bcopy.o ex_crypt. o 02/03/31 TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lib/nls/msg/C/exrecover.cat: None TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lbin/exrecover: $Revision: 82.6.1.21 $ 32-bit NLS $ $Revision: 76.2.1.1 $ PATCH_11_00: hpux_rel.o exrecover.o ex_extern.o 02/0 3/31 TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lbin/expreserve: $Revision: 82.6.1.21 $ 32-bit NLS $ $Revision: 76.2 $ PATCH_11_00: hpux_rel.o expreserve.o ex_extern.o 02/ 03/31 cksum(1) Output: TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 4258324492 249856 /usr/bin/e TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 4258324492 249856 /usr/bin/edit TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 4258324492 249856 /usr/bin/ex TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 4258324492 249856 /usr/bin/vedit TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 4258324492 249856 /usr/bin/vi TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 4258324492 249856 /usr/bin/view TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 3071133312 558 /usr/lib/nls/msg/C/exrecover.cat TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 4181528766 24576 /usr/lbin/exrecover TextEditors.EDITORS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 1740671480 20480 /usr/lbin/expreserve Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_13828 PHCO_22229 Equivalent Patches: None Patch Package Size: 320 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_26021 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_26021.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_26021. 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_26021.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_26021.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_26021.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None