Usage notes
- The enclave terminates if the subroutine issues a STOP or EXIT
statement (or an exit() function), or if there is an unhandled condition.
However, the process level is not terminated. When the enclave level
is terminated, any subsequent invocation creates a new enclave using
the same runtime options used in the creation of the first enclave. Language Environment does
not delete any user routines that were loaded into the PreInit table.
However, if, the first valid entry in the PreInit table is different than when the enclave was last initialized, the assembler user exit (CEEBXITA), HLL user exit (CEEBINT), and/or programmer default runtime options (CEEUOPT) used during the enclave re-initialization might be different. PreInit subroutine initialization uses these external references only when associated with the first valid entry in the PreInit table. Therefore, when using PreInit subroutine environments and you want consistent enclave initialization behavior across the stop semantics, you need to ensure the first valid entry in the PreInit table does not change, especially when it contains the aforementioned external references.
(See Stop semantics.) - Any subroutine that modifies external data cannot make assumptions about the initial state of that external data. The initial state of the external data is influenced by previous instances of the same subroutine and also by previous instances of any subroutine that caused enclave termination.
- C subroutines that are not naturally reentrant and C++ subroutines can be invoked using call_sub_addr only in an XPLINK environment. In a non-XPLINK environment, they must be invoked using call_sub.
- If the first entry in the PreInit table contained a CEEBXITA, CEEBINIT or CEEUOPT when the environment was initialized and is then deleted or changed, the results of subsequent enclave re-initialization or termination is unpredictable. It is the responsibility of the user to ensure the first entry in the PreInit table does not change, especially when it contains the aforementioned external references.