fix(backend/sgx): exit for CSSA > 3
Do not enter a CSSA > 3, but exit the whole process.
NUM_SSA is only 4 anyway.
@@ -138,9 +138,6 @@ impl super::super::Thread for Thread {
"Unexpected {:?}: address = {:>#016x}, error code = {:>#016b} cssa={}",
run.vector, run.exception_addr, run.exception_error_code, self.cssa
);
- if self.cssa > 4 {
- std::process::exit(1);
- }
EENTER
} else {
panic!(
@@ -161,6 +158,11 @@ impl super::super::Thread for Thread {
_ => unreachable!(),
}
+ if self.cssa > 3 {
+ error!("CSSA overflow");
+ std::process::exit(1);
+ }
+
// If we have handled an InvalidOpcode error, evaluate the sallyport.
//
// Currently, we have no way to know if the sallyport contains a valid
