edit/sum (sumslp) crash for stream-lf input file

Share your experience porting VMS applications to x86 here.

Topic author
malmberg
Contributor
Posts: 22
Joined: Tue Apr 16, 2024 7:55 pm
Reputation: 0
Status: Offline

edit/sum (sumslp) crash for stream-lf input file

Post by malmberg » Wed Jan 08, 2025 9:30 am

This showed up as part of the unit tests validating the port of the gawk package of OpenVMS.

Demonstration script:

Code: Select all

$! sum_streamlf_test.com

$create stream_lf.txt
$set file stream_lf.txt /attr=(rfm:stmlf,lrl:32767,mrs:0,rat:cr)
$open/write slf stream_lf.txt
$write slf "line 1"
$write slf "line 2"
$write slf "line 3"
$close slf

edit/sum stream_lf.txt /update=sys$input: /output=stream_lf.out
-1,2
/
$ diff stream_lf.txt stream_lf.out
Running Script:

Code: Select all

ROBIN> set ver
ROBIN> @sum_streamlf_test.com
$! sum_streamlf_test.com

$create stream_lf.txt
$set file stream_lf.txt /attr=(rfm:stmlf,lrl:32767,mrs:0,rat:cr)
$open/write slf stream_lf.txt
$write slf "line 1"
$write slf "line 2"
$write slf "line 3"
$close slf

edit/sum stream_lf.txt /update=sys$input: /output=stream_lf.out
%SYSTEM-F-ACCVIO, access violation, reason mask=05, virtual address=FFFFFFFF8000
6695, PC=FFFF830007C0DD1A, PS=0000001B

  Improperly handled condition, image exit forced.
    Signal arguments:   Number = 0000000000000005
                        Name   = 000000000000000C
                                 0000000000000005
                                 FFFFFFFF80006695
                                 FFFF830007C0DD1A
                                 000000000000001B
    Register dump:
    RAX = FFFFFFFF80006695  RDI = FFFFFFFF80006695  RSI = 0000000000000005
    RDX = 000000000000002E  RCX = 0000000000000000  R8  = 000000007AC9F3A0
    R9  = 0000000000000000  RBX = 000000007AC9FF58  RBP = 000000007AC9F390
    R10 = 0000000000000010  R11 = 0000000000000206  R12 = 000000007AC9F598
    R13 = 0000000000000000  R14 = 000000007FFCDA98  R15 = 000000012B274603
    RIP = FFFF830007C0DD1A  RSP = 000000007AC9F368  SS  = 000000000000001B
%DCL-W-SKPDAT, image data (records not beginning with "$") ignored

User avatar

arne_v
Senior Member
Posts: 640
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Offline
Contact:

Re: edit/sum (sumslp) crash for stream-lf input file

Post by arne_v » Mon Jan 13, 2025 2:04 pm

I am more surprised that SUMSLP is still being used.

To me SUMSLP was made obsolete when TPU and Perl arrived.

TPU is actually pretty good to write well structured text manipulation.

Perl is good at doing magic in text manipulation.

Disclaimer: I don't know SUMSLP so there is a risk that it is a classic "don't know => don't see the benefits".
Arne
arne@vajhoej.dk
VMS user since 1986


jonesd
Master
Posts: 128
Joined: Mon Aug 09, 2021 7:59 pm
Reputation: 0
Status: Offline

Re: edit/sum (sumslp) crash for stream-lf input file

Post by jonesd » Mon Jan 13, 2025 3:46 pm

arne_v wrote:
Mon Jan 13, 2025 2:04 pm
I am more surprised that SUMSLP is still being used.

To me SUMSLP was made obsolete when TPU and Perl arrived.

TPU is actually pretty good to write well structured text manipulation.
SUMSLP is batch oriented, its structure is "replace lines with these line numbers with these lines". It also uses the VFC record format to provide an audit trail of revisions to the file.

Making an update file with "$ DIFF/SLP" is easier, and likely easier to automate, than making an equivalent set of TPU commands.

SUMSLP's biggest failing is the 65K limit on line numbers.
Last edited by jonesd on Mon Jan 13, 2025 3:47 pm, edited 1 time in total.


hb
Master
Posts: 173
Joined: Mon May 01, 2023 12:11 pm
Reputation: 0
Status: Offline

Re: edit/sum (sumslp) crash for stream-lf input file

Post by hb » Mon Jan 13, 2025 3:52 pm

arne_v wrote:
Mon Jan 13, 2025 2:04 pm
...
To me SUMSLP was made obsolete when TPU and Perl arrived.
...
I assume, obsolete for you to use. Making something obsolete in VMS, if you want backward compatibility, isn't easy. I'm not aware of a TPU procedure or Perl program that processes and reads command qualifiers and input as EDIT/SUM. If it is made obsolete in VMS, should DIFF/SLP be made obsolete as well? (What do other developers use to merge source code? I used both VMS utilities before I switched to kdiff3, on Linux.)

On the other hand, EDIT/SUM is somehow "unsupported". From the DCL manual
EDIT/SUM — Invokes the SUMSLP utility, a batch-oriented editor, to update a single input file with multiple files of edit commands. For more information about the SUMSLP utility, see the OpenVMS SUMSLP Utility Manual or online help.
but there is no such manual available.

User avatar

arne_v
Senior Member
Posts: 640
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Offline
Contact:

Re: edit/sum (sumslp) crash for stream-lf input file

Post by arne_v » Mon Jan 13, 2025 7:59 pm

hb wrote:
Mon Jan 13, 2025 3:52 pm
arne_v wrote:
Mon Jan 13, 2025 2:04 pm
...
To me SUMSLP was made obsolete when TPU and Perl arrived.
...
I assume, obsolete for you to use. Making something obsolete in VMS, if you want backward compatibility, isn't easy.
Obsolete does not mean removed. It just mean should not to be used in new stuff.

There are a bunch of obsolete system services - they still work.

SYS$TRNLOG has been obsolete for many many years and still works on VMS x86-64 9.2-3.
hb wrote:
Mon Jan 13, 2025 3:52 pm
I'm not aware of a TPU procedure or Perl program that processes and reads command qualifiers and input as EDIT/SUM. If it is made obsolete in VMS, should DIFF/SLP be made obsolete as well? (What do other developers use to merge source code? I used both VMS utilities before I switched to kdiff3, on Linux.)
Good point about diff. There is no replacement for that in VMS.

(GNU diff and patch has been ported to VMS, but they do not come with VMS)
hb wrote:
Mon Jan 13, 2025 3:52 pm
On the other hand, EDIT/SUM is somehow "unsupported". From the DCL manual
EDIT/SUM — Invokes the SUMSLP utility, a batch-oriented editor, to update a single input file with multiple files of edit commands. For more information about the SUMSLP utility, see the OpenVMS SUMSLP Utility Manual or online help.
but there is no such manual available.
I think the manual is considered "archived".

There is a copy at:
https://www.digiater.nl/openvms/doc/alp ... P_UTIL.PDF

And the directory:
https://www.digiater.nl/openvms/doc/alp ... _archived/
has a bunch of archived manuals for obsolete stuff. Including DSR, EDT, PATCH and PPL$ RTL.

(I remember PPL$ from very early 90's)

Added in 1 minute 16 seconds:

Code: Select all

      program trnlog
      integer*4 dnmlen
      character*80 dnm
      call sys$trnlog('SYS$DISK', dnmlen, dnm, , ,)
      write(*,*) '|' // dnm(1:dnmlen) // '|'
      end
Arne
arne@vajhoej.dk
VMS user since 1986

User avatar

arne_v
Senior Member
Posts: 640
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Offline
Contact:

Re: edit/sum (sumslp) crash for stream-lf input file

Post by arne_v » Thu Feb 13, 2025 9:45 pm

VSI just released:

Code: Select all

Publication Date: February 2025

Operating System:
    VSI OpenVMS x86-64 V9.2-2

Kit Name:
    VMS922X_SUMSLP-V0100
Arne
arne@vajhoej.dk
VMS user since 1986


amuir
Contributor
Posts: 12
Joined: Thu Feb 29, 2024 1:40 pm
Reputation: 0
Status: Offline

Re: edit/sum (sumslp) crash for stream-lf input file

Post by amuir » Fri Feb 14, 2025 6:04 am

Quick draw, Arne. You beat me to the punch. That patch does indeed correct this issue.

Post Reply