﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
391	exec_com &condition_info_ptr parameter does not point to a good condition_info structure	gary.c.dixon@…	Eric Swenson	"The exec_com (version 2) program language includes a set of features which enable the program to establish an on-unit to handle one or more conditions that might occur while the program is executing.

{{{
&on active_function_error &begin
   &set status_code &[status_code_name &condition_info_ptr]
   &print Condition &condition_name occurred to report event
   &print &""   "" at location &condition_info_ptr 
   call cu_$cl
   &end
...
}}}

The &condition_info_ptr parameter is supposed to expand to a virtual pointer 
(<segment_number>|<offset>) locating a condition_info structure  
describing the condition being handled.  This permits a command or
active function to access added details about the event being handled
by the current on-unit invocation.  For example, the on-unit shown above
sets the status_code variable to the name of the Multics status code
being reported in a com_err_ or active_fnc_err_ subroutine call.

However, the exec_com interpreter does not properly call the
find_condition_info_ subroutine to fill-in elements of the 
condition_info structure before executing line of the on-unit.  The
&condition_info_ptr parameter does locate a data structure, but 
elements of that structure contain previous stack data because
the structure was not properly initialized with details from the
reported event.

Executing an exec_com program with the statements above currently
generates a virtual_ptr value for the &condition_info_ptr that has
a correct format for a pointer locator, but points to storage for a
condition_info structure with bogus element contents.

{{{
ec test_status
Condition active_function_error occurred to report event
   at location 234|14716 

r 16:54 0.192 7 level 2

ds 234|14716 -as condition_info -lg
014716
condition_info                @ 234|14716
  mc_ptr = 0(0),au [invalid]
  version = 0, 
  condition_name = """"
  info_ptr = 6(0) [invalid]
  wc_ptr = 247|7034   [pd]>!BBBKbbxJZGjlPk.area.linker
  loc_ptr = 234|14562   [pd]>stack_4
  flags                       @ 234|14740
    OFF: crawlout
  user_loc_ptr = 234|14516   [pd]>stack_4
r 16:54 0.182 5 level 2
}}}

The condition_name is blank, and most other data in the structure is
invalid.  This is especially true of condition_info.info_ptr which
is supposed to locate the com_af_error_info structure created by
active_fnc_err_ when it signals the active_function_error condition.

The data at location 234|14716 is shown by the dump_segment command."	defect	new	major		Standard Library	MR12.8			
