Skip to content

Commit c5b47dd

Browse files
authored
refactor: remove dead guest stackoverflow reporting code (#1245)
The guest self-reporting stackoverflow mechanism is dead code. Closes #1161 Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent b7232ea commit c5b47dd

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

src/hyperlight_host/src/error.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,6 @@ pub enum HyperlightError {
229229
#[error("Snapshot Size Mismatch: Memory Size {0:?} Snapshot Size {1:?}")]
230230
SnapshotSizeMismatch(usize, usize),
231231

232-
/// Stack overflow detected in guest
233-
#[error("Stack overflow detected")]
234-
StackOverflow(),
235-
236232
/// Tried to restore snapshot to a sandbox that is not the same as the one the snapshot was taken from
237233
#[error("Snapshot was taken from a different sandbox")]
238234
SnapshotSandboxMismatch,
@@ -323,7 +319,6 @@ impl HyperlightError {
323319
| HyperlightError::ExecutionCanceledByHost()
324320
| HyperlightError::PoisonedSandbox
325321
| HyperlightError::ExecutionAccessViolation(_)
326-
| HyperlightError::StackOverflow()
327322
| HyperlightError::MemoryAccessViolation(_, _, _)
328323
| HyperlightError::SnapshotSizeMismatch(_, _)
329324
| HyperlightError::MemoryRegionSizeMismatch(_, _, _)

src/hyperlight_host/tests/integration_test.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,6 @@ fn guest_panic_no_alloc() {
592592
)
593593
.unwrap_err();
594594

595-
if let HyperlightError::StackOverflow() = res {
596-
panic!("panic on OOM caused stack overflow, this implies allocation in panic handler");
597-
}
598-
599595
assert!(
600596
matches!(
601597
&res,

0 commit comments

Comments
 (0)