Opened 5 years ago

Closed 5 years ago

#260 closed defect (fixed)

hcom is updating records used (adding a page) even for a "ds" (display) operation

Reported by: Eric Swenson Owned by: Gary Dixon
Priority: major Milestone: MR12.8
Component: Tools Version: MR12.7
Keywords: Cc: Gary Dixon

Description

If you take the segment bound_full_cp_.bind, and check its records used (st bound_full_cp_.bind -cl), you will see that it is 2 records long. This is correct. If you then invoke the "hcom ds bound_full_cp_.bind" command to display the history comments, and then re-execute the "st" command, you will see that the records used is now 3.

Change History (3)

comment:1 by Gary Dixon, 5 years ago

Owner: changed from Eric Swenson to Gary Dixon
Status: newaccepted

comment:2 by Gary Dixon, 5 years ago

The extension of some segments (adding records used to segment without changing their bit count) was caused my incorrect arguments passed to lex_string_$lex by the hcom_parse_.rd subroutine.

compare_ascii >ldd>tools>source>bound_pnotice_.s.archive::hcom_parse_.rd ==

Inserted in B:
B32         7) change(2021-11-11,GDixon):
B33            Fix call to lex_string_$lex to pass correct length of comment to be parsed.
B34            This prevents lex_string_ from referencing beyond end of input segment,
B35            thereby extending records used in that segment without changing its bit count.
Preceding:
A32                                                          END HISTORY COMMENTS */


A318      call lex_string_$lex (addr(seg), length(cmt)+Lignore, Lignore, proc_ptr, "0000"b,"","","","","",BREAKS,
Changed by B to:
B322      call lex_string_$lex (addr(seg), length(cmt), Lignore, proc_ptr, "0000"b,"","","","","",BREAKS,

This problem only occurs in short segments having a significant number of history comments. Usually history comments appear near the top of a source file. The bug causes lex_string_ to count lines in the Lignore part of the input seg, then create tokens describing
a history comment entry whose length mistakenly includes the Lignore region of the segment, plus actual length of the comment.
If the segment's contents ends near a page boundary, creating tokens for a comment that mistakenly includes the Lignore part of the segment can cause lex_string_ to look beyond that last page boundary, thereby extending length of the segment.

After the correction, tokens are generated only for the actual comment entry; and count of records used in the segment does not get
extended.

Version 0, edited 5 years ago by Gary Dixon (next)
Note: See TracTickets for help on using tickets.