File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
intel-sgx/enclave-runner/src/usercalls Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -855,9 +855,6 @@ impl EnclaveState {
855
855
EnclavePanic :: DebugStr ( "async exit with a panic" . to_owned ( ) )
856
856
}
857
857
} ;
858
- if enclave. forward_panics {
859
- panic ! ( "{}" , & panic) ;
860
- }
861
858
Err ( EnclaveAbort :: Exit { panic : Some ( panic) } )
862
859
}
863
860
Err ( EnclaveAbort :: Exit { panic : false } ) => Err ( EnclaveAbort :: Exit { panic : None } ) ,
@@ -1093,10 +1090,17 @@ impl EnclaveState {
1093
1090
let main_result =
1094
1091
EnclaveState :: syscall_loop ( enclave. clone ( ) , io_queue_receive, io_queue_send, work_sender) ;
1095
1092
1093
+ if let Err ( EnclaveAbort :: Exit { panic : Some ( panic) } ) = & main_result {
1094
+ if enclave. forward_panics {
1095
+ panic ! ( "{}" , panic) ;
1096
+ }
1097
+ }
1098
+
1096
1099
for handler in join_handlers {
1097
1100
let _ = handler. join ( ) ;
1098
1101
}
1099
- return main_result;
1102
+
1103
+ main_result
1100
1104
}
1101
1105
1102
1106
pub ( crate ) fn main_entry (
You can’t perform that action at this time.
0 commit comments