Opened 2 years ago
Closed 12 months ago
#337 closed defect (fixed)
ssu_$get_area comment argument is ignored by define_area_ subroutine
| Reported by: | Gary Dixon | Owned by: | Gary Dixon |
|---|---|---|---|
| Priority: | major | Milestone: | MR12.9 |
| Component: | Hardcore | Version: | MR12.8 |
| Keywords: | define_area_ | Cc: |
Description
The ssu_$get_area subroutine has the following calling sequence...
help ssu_$get_area -bf -ca comment
>udd>m>gd>w>ssup>ssu_.info (50 lines in entry point; 65 other entry points in info)
Entry: 1983-01-19 ssu_$get_area
Syntax:
declare ssu_$get_area entry (ptr, ptr, char(*), ptr);
call ssu_$get_area (sci_ptr, area_info_ptr, comment, area_ptr);
Arguments:
sci_ptr area_info_ptr comment area_ptr
Arguments:
comment
is a comment identifying the use to which the area will be put.
(Input) It is used in constructing the owner name for the call to
define_area_, in the form:
subsys_name.N (comment)
where subsys_name is the name of the subsystem, N is the invocation
level for this invocation, and the comment (if any) follows, in
parentheses. This is done to make it easier to identify the segment
names listed by list_temp_segments.
ssu_temp_mgr_$get_area stores the "subsys_name.N (comment)" string in the area_info.owner element when it calls define_area_ to create an area with specified characteristics in a temporary segment.
define_area_ embeds the area_info.owner field in a caller argument it passes to the get_temp_segment_ subroutine. However, because area_info.owner is a non-varying character string, define_area_ truncates the .owner field before the first SP character so it can add a ".area" suffix to that owner. Since ssu_$get_area places its caller's comment in parenthesis and preceded by a SP character, the comment argument to the ssu_$get_area subroutine is never used. This is a defect.
For example, a call to ssu_$get_area by the test_parms subsystem with comment = "token_area" generates a temporary segment with the comment (displayed by list_temp_segments command) as follows...
..list_temp_segments
22 Segments, 8 Free
...
!BBBKXkgPkQlgbk.temp.0454 test_parms.1.area
A better line would prefer use of the caller-provided comment rather than the ".area" suffix added arbitrarily by define_area_.
..list_temp_segments
22 Segments, 8 Free
...
!BBBKXkgPkQlgbk.temp.0454 test_parms.1 (token_area)
Change History (4)
comment:2 by , 13 months ago
| Owner: | changed from to |
|---|---|
| Status: | new → accepted |
comment:3 by , 13 months ago
| Milestone: | MR12.8 → No Milestore |
|---|
comment:4 by , 12 months ago
| Milestone: | No Milestore → MR12.9 |
|---|---|
| Resolution: | → fixed |
| Status: | accepted → closed |
| Version: | → MR12.8 |
https://s3.amazonaws.com/eswenson-multics/public/mcrs/MCR10155.pdf
Fixed by MR12.9-1025.

Code in define_area_ which creates a temporary segment in which to hold the area is shown below.
/* First create the area segment if necessary. The nullness of the input area pointer indicates what we are to do. */ if area_info.areap = null then do; /* null means we should get an area segment */ len = index (area_info.owner, " ") - 1; if len < 0 then len = length (area_info.owner); if area_info.system | (get_ring_ () = 0) then call hcs_$make_seg ("", unique_chars_ (""b) || ".area." || substr (area_info.owner, 1, 10), "", 01110b, area_info.areap, code); else call get_temp_segment_ (substr (area_info.owner, 1, len) || ".area", area_info.areap, code); if code ^= 0 then goto ERROR; defined = "1"b; end;I believe this code should determine length of the area_info.owner field by looking for the last non-SPace character.
Instead of trying to add a suffix-like string ".area", it should try to add a parenthesized string " (area)" if the substring "area" is not already present in the .owner element.