Skip to content

fix: track backtrace register availability - #273

Open
swananan wants to merge 1 commit into
mainfrom
fix/backtrace-register-availability
Open

fix: track backtrace register availability#273
swananan wants to merge 1 commit into
mainfrom
fix/backtrace-register-availability

Conversation

@swananan

Copy link
Copy Markdown
Owner

Summary

  • track RBP availability separately from its recovered value across inline and tail-call unwinding
  • reject unavailable CFA and return-address register sources before issuing memory probes
  • add regression coverage for a valid zero-valued RBP used as the return-address register

Testing

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test -p ghostscope-protocol -p ghostscope-compiler --lib
  • targeted host e2e for zero-valued RBP, undefined RBP propagation, and unavailable return-address recovery
  • full host e2e reached backtrace_execution with 31/31 passing, then stopped at the unrelated existing complex_types_execution::test_cross_type_comparisons_local pointer ordered-comparison expectation

Container-topology e2e was intentionally skipped because this change does not affect container, Docker, or PID-namespace behavior.

@swananan
swananan force-pushed the fix/backtrace-register-availability branch 2 times, most recently from 8daf31c to 785cc1d Compare August 18, 2026 02:18
Preserve RBP availability across inline and tail-call unwinding so a
zero-valued register remains distinct from an unavailable one.

Propagate availability into CFA and return-address recovery, guard RA memory
reads by recovery kind, and select unavailable errors without adding verifier
control-flow branches per frame.

Cover the zero-valued tail-call case in e2e and serialize verifier-heavy
backtrace loads so concurrent tests do not stall shared container sandboxes.
@swananan
swananan force-pushed the fix/backtrace-register-availability branch from 785cc1d to fb079bd Compare August 18, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant