Skip to content

Conversation

adamperlin
Copy link
Contributor

@adamperlin adamperlin commented Aug 22, 2025

This PR fixes #735. The approach used here is to onboard the heapless crate to hyperlight-guest-bin and utilize a static lifetime fixed-size heapless::String to hold the panic message.

@adamperlin adamperlin force-pushed the adamperlin/panic-remove-allocations branch from c83158f to 93e8563 Compare August 22, 2025 21:18
@jprendes jprendes added the kind/bugfix For PRs that fix bugs label Aug 22, 2025
@danbugs danbugs requested a review from Copilot August 22, 2025 21:39
Copilot

This comment was marked as outdated.

@adamperlin adamperlin force-pushed the adamperlin/panic-remove-allocations branch 3 times, most recently from 1b0113c to 576df92 Compare August 26, 2025 05:45
@adamperlin adamperlin force-pushed the adamperlin/panic-remove-allocations branch from 2f25176 to d786619 Compare August 27, 2025 20:23
@adamperlin
Copy link
Contributor Author

adamperlin commented Aug 28, 2025

Just a note here, this is currently blocked on fuzzing failures due to the memory leak described in #826; currently attempting to use snapshotting in the host call fuzzer to restore back to a clean memory state on each fuzzing iteration, which I will open a separate PR for.

adamperlin and others added 9 commits August 28, 2025 15:07
Signed-off-by: adamperlin <adamp@nanosoft.com>
using a new FixedStringBuf type backed by a static mut array.
Adds a test to verify that StackOverflow no longer occurs on OOM panic

Signed-off-by: adamperlin <adamp@nanosoft.com>
Add some docstrings

Signed-off-by: adamperlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
…n panic handler to avoid any possible recursive panic

Signed-off-by: adamperlin <adamp@nanosoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Adam Perlin <adamp@nanosoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Adam Perlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
integration test
2. Resolve clippy errors

Signed-off-by: adamperlin <adamp@nanosoft.com>
for panic string formatting

Signed-off-by: adamperlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
@adamperlin adamperlin force-pushed the adamperlin/panic-remove-allocations branch from d786619 to 246518c Compare August 28, 2025 22:18
simpleguest

Signed-off-by: adamperlin <adamp@nanosoft.com>
@adamperlin
Copy link
Contributor Author

@ludfjig @dblnz This should be ready for another review!

Signed-off-by: adamperlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
kind/bugfix For PRs that fix bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't alloc memory in panic handler
5 participants