Opened 5 years ago

#222 new defect

save_dir_info mishandles names for branches saved in the .dir_info file

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

Description

The save_dir_info command (tool) has problems saving names of branches in a directory. The name count is mis-handled.

For example, in the sseg internal procedure:

sseg:     proc;

               ec = 0;
               xxp = addr (seg_rec.brstat);
               call hcs_$status_long (dirname, en, 0, xxp, null, ec);
               if ec ^= 0 then return;

But later in that internal procedure, the data returned by hcs_$status_long is referenced using point p instead of pointer xxp.

               seg_rec.n_names = fixed (p -> branches.nname, 16);
               tp = addr (seg_rec.names);
               do j = 1 to seg_rec.n_names;
                    tp -> names (j) = nptr -> names (j+k-1);
                    end;
               next_xp = addr (seg_rec.end_seg_rec);
               seg_rec.fnext = rel (next_xp);
               oldxp = xp;
               xp = next_xp;

          end sseg;

Similar problems occur in internal procedures sdir and slink.

This is an internal administrative tool which is seldom used (after the new storage system code gained stability). So it's not surprising these bugs have not been noticed.

USERS of this tool should beware.

Perhaps this tool (though documented in MPM Commands and in help files) should be moved to the obsolete library?

Change History (0)

Note: See TracTickets for help on using tickets.