﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
293	unpaged_page_tables.incl.pl1 has an invalid declaration of the upt header.	Gary Dixon	Gary Dixon	"The unpaged_page_tables.incl.pl1 segment includes a declaration that is not valid PL/I.


{{{
dcl  upt_ptr                          ptr;
dcl  1 upt                            aligned based (upt_ptr),
       2 sst_absloc                   fixed bin (26),       /* for dump analyzers */
       2 sst_last_loc                 fixed bin (26),
       2 upt_absloc                   fixed bin (26),
       2 upt_last_loc                 fixed bin (26),
       2 iupt_absloc                  fixed bin (26),
       2 iupt_last_loc                fixed bin (26),

       2 current_length               fixed bin,            /* number of words currently used */
       2 max_length                   fixed bin,            /* max number of words in memory allocated */
       2 first_entry                  like upt_entry;

dcl  upt_entry_ptr                    ptr;
dcl  1 upt_entry                      aligned based (upt_entry_ptr),
       2 size                         fixed bin,            /* number of page table words allocated */
       2 segno                        fixed bin,            /* of hardcore segment */
       2 ptws                         (0 refer (upt_entry.size)) bit (36) aligned;

}}}

The declaration of upt.first_entry is invalid because it is declared “like upt_entry”, but that structure is declared with refer extents.

AG94 page 5-5 states:

The only <attribute>s copied by the expansion of the <like attribute> are those
<attribute>s that were explicitly specified in the declaration of the members of
the structure identified by the <like reference>. No inherited <dimension
attribute>, <aligned attribute> or <unaligned attribute> is copied. Since
expansion occurs before <attribute>s are supplied by default, <attribute>s
supplied by default are not copied.

Because dimension attributes are not copied, the array dimension of upt_entry.ptws is not copied, but the fact that it is an array is copied.  The ramification is that the azm request “d unpaged_page_tables -as upt” loops indefinitely attempting to display the upt.ptws(*) array.


{{{
azm:  d unpaged_page_tables -as upt
upt                           @ 12|0
  sst_absloc = 3960832, sst_last_loc = 4127743, upt_absloc = 21504, upt_last_loc = 22527, iupt_absloc = 0, iupt_last_loc = 0,
  current_length = 496, max_length = 1024
  first_entry                 @ 12|10
    size = 1, segno = 1, ptws (1) = ""000100421125""b3, ptws (2) = ""000000011003""b3, ptws (3) = ""000000000001""b3,
    ptws (4) = ""000000000005""b3, ptws (5) = ""000240421125""b3, ptws (6) = ""000000011003""b3, ptws (7) = ""000000000002""b3,
    ptws (8) = ""000000000010""b3, ptws (9) = ""000460421125""b3, ptws (10) = ""000500421125""b3, ptws (11) = ""000000000001""b3,
    ptws (12) = ""000000000012""b3, ptws (13) = ""000520421125""b3, ptws (14) = ""000000011003""b3, ptws (15) = ""000000000002""b3,
    ptws (16) = ""000000000013""b3, ptws (17) = ""000240421125""b3, ptws (18) = ""000260420025""b3, ptws (19) = ""000000000001""b3,
        . . .
}}}

The only way out of this azm loop is to quit (telnet “send break”) and then program_interrupt back into azm request loop.

I also believe that the <like attribute> cannot include a declaration with a <refer option> because the name of the variable referenced in the <refer option> is not properly qualified when copied into the structure declared using the <like attribute>.  But I can’t find that restriction stated clearly in AG94.

The fix would involve repeating the substructure in upt_entry as lines in upt.first_entry, with the refer clause changed to (0 refer (upt.first_entry.size)).  That way, the display of upt would stop after displaying the first upt_entry’s worth of data.

Only structure_library_5_.cds  would have to be recompiled to implement the bug fix.  None of the other code using this include file has encountered a problem with the current declaration.
"	defect	closed	minor	MR12.8	Hardcore	MR12.7	fixed		
