Skip to content

gdb: fix sandbox function cancellation when gdb enabled #621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2025

Conversation

dblnz
Copy link
Contributor

@dblnz dblnz commented Jun 13, 2025

  • when the gdb features is enabled, the EINTR exit reason was always mapped to a Debug stop reason. With the new changes to the threading model, the EINTR exit reason can be a result of a cancel request. We need to first check if a cancel was requested, if not, it means a sandbox with debugging enabled was issued an interrupt request from the debugger
  • adds a way for a sandbox under debugging to remain attached to the debugger when a crash happens. This way the crash can be inspected. This forbids continuing execution and writing to memory and registers.

- when the `gdb` features is enabled, the EINTR exit reason was always
  mapped to a Debug stop reason. With the new changes to the threading
  model, the EINTR exit reason can be a result of a cancel request.
  We need to first check if a cancel was requested, if not, it means a
  sandbox with debugging enabled was issued an interrupt request from
  the debugger
- adds a way for a sandbox under debugging to remain attached to the
  debugger when a crash happens. This way the crash can be inspected.
  This forbids continuing execution and writing to memory and registers.

Signed-off-by: Doru Blânzeanu <dblnz@pm.me>
@dblnz dblnz force-pushed the gdb-crash-reporting-improvements branch from 88d2adb to c7232c8 Compare June 16, 2025 09:59
@dblnz dblnz merged commit cb3ed3c into hyperlight-dev:main Jun 16, 2025
54 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bugfix For PRs that fix bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants