Skip to content

Fix try/catch control flow in eBPF and missing catch body in userspace#11

Merged
congwang-mk merged 1 commit intomultikernel:mainfrom
SiyuanSun0736:main
Mar 5, 2026
Merged

Fix try/catch control flow in eBPF and missing catch body in userspace#11
congwang-mk merged 1 commit intomultikernel:mainfrom
SiyuanSun0736:main

Conversation

@SiyuanSun0736
Copy link
Contributor

eBPF Control Flow Update

  • Context Extension: Added current_catch_label to c_context to track the exit point of try blocks.
  • Jump Mechanism: IRTry now generates a unique label emitted before the catch logic; IRThrow emits a goto to this label, preventing execution of subsequent instructions in the try block.

Userspace Backend Update

  • Logic Realization: Replaced static placeholder comments in catch clauses with recursive calls to generate_c_instruction_from_ir.
  • Code Generation: Instructions within catch_body are now concatenated and properly indented within the C switch statement.

@congwang-mk congwang-mk merged commit 025a057 into multikernel:main Mar 5, 2026
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.

2 participants