Technical article 105252

vi core dumps when doing a global search and replace on OpenServer 5 and IFS.

OpenServer 5.0.0OpenServer 5.0.2

Written · Last revised

Problem

After the third or fourth execution of the command:

g/string1/s//string2/gp
vi will core dump.

Solution

SCO has not been able to reproduce this problem without the
gp option.  Try the search and replace without the gp option.
You could also use a SCO UNIX System V/386 Version 4.2 binary.
SCO has created a new /usr/bin/vi binary.  This binary is
available upon request from SCO Support Services.  Please follow
the steps below to properly install the new binary.

1. Perform a checksum of the ex binary:

sum -lr ex
This should yield:
2481963646   502 ex

2. As root, cd to the directory:

cd /opt/K/SCO/Unix/5.0.2Dp/usr/bin
3. Move the following files to another location.  After you are
   satisfied with the new binary, remove these files:
edit     vedit
ex       view
vi

4. Copy the ex binary into the directory:

/opt/K/SCO/Unix/5.0.2Dp/usr/bin

5. Create the links to the above files:

ln ex edit
ln ex vi
ln ex vedit
ln ex view
Note: The symbolic links to /usr/bin/<file> should
still be intact.  If the files /usr/bin/ex, /usr/bin/vi, and so on,
do not exist, you can create the links using the command:
ln -s edit /usr/bin/edit

6. Change the permissions and the ownership:

chmod 01711 ex
chgrp bin ex
chown bin ex
The files should have these permissions:
# l edit ex vedit vi view
-rwx--x--t   5 bin      bin       256748 Mar 15  1996 edit
-rwx--x--t   5 bin      bin       256748 Mar 15  1996 ex
-rwx--x--t   5 bin      bin       256748 Mar 15  1996 vedit
-rwx--x--t   5 bin      bin       256748 Mar 15  1996 vi
-rwx--x--t   5 bin      bin       256748 Mar 15  1996 view
7. Change to the /opt/K/SCO/Unix/5.0.2Dp/.softmgmt directory:
cd ../../.softmgmt

8. Find this line in the file VI.fl:

FILE 01711 bin bin 5 175708 1775883987 - - - 0 0 ./usr/bin/vi

9. Modify both the size and checksum in this line (as given in step 1 and 6 above), so that it reads:

FILE 01711 bin bin 5 256748 2481963646 - - - 0 0 ./usr/bin/vi

10. Save the changes to VI.fl
NOTE:     If you move the original ex binary back, the above steps should
          be repeated, this time for the original binary instead of the new
          one.

From the Xinuos technical article database, record 105252. Reproduced with permission. The original is at www.sco.com/ta/105252, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.