Project

General

Profile

Bug #3210

Make procedure attributes of deleted TARGET-PROCEDURE and SOURCE-PROCEDURE accessible

Added by Hynek Cihlar over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
11/14/2016
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version:

History

#1 Updated by Hynek Cihlar over 7 years ago

When procedure attributes of deleted TARGET-PROCEDURE and SOURCE-PROCEDURE are accessed native 4GL does not cause an invalid handle error as does for regular non-system procedure handles.

The test case high-level steps are as follows (and this is how native 4GL behaves).
  • Delete TARGET-PROCEDURE that is not itself a THIS-PROCEDURE (so that it is immediately made invalid) with DELETE PROCEDURE TARGET-PROCEDURE.
  • VALID-HANDLE(TARGET-PROCEDURE) will return FALSE.
  • Read TARGET-PROCEDURE:NAME for example, the procedure name will be returned.
  • Assign TARGET-PROCEDURE to a variable of type HANDLE.
  • Repeat the above step and read the NAME attribute through the variable, this time invalid handle error will be reported.

In P2J for the above case invalid handle error is reported regardless whether NAME is accessed through the system handle or a temp variable.

Note that procedure methods can be invoked without an apparent error, too. For example when TARGET-PROCEDURE:ADD-SUPER-PROCEDURE is called on a deleted handle, the call is dispatched without an error being indicated in ERROR-STATUS.

See uast/delete-source-procedure*.p and uast/delete-target-procedure*.p for the details how to reproduce the case.

Also available in: Atom PDF