Repository navigation
fix(guest): allow guest functions with more than 11 parameters - #1998
Merged
Merged
Conversation
Registration accepts guest functions with up to 32 parameters, but verify_parameters rejected every call with more than 11. Remove the limit. The guest still rejects a call whose argument count differs from the function's parameter count. Add a 32-parameter guest function test, and doctests that 32 parameters compile and 33 do not. Fixes hyperlight-dev#1996 Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
ludfjig
requested review from
andreiltd,
danbugs,
dblnz,
devigned,
jprendes,
jsturtevant,
simongdavies,
squillace and
syntactically
as code owners
October 29, 2026 21:46
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change extending guest-call support to 32 parameters.
No open issues 🎉
What changed in this PR
This PR fixes #1996 by allowing guest calls beyond 11 parameters, matching registration’s 32-parameter support. Signature validation still rejects mismatched argument counts.
Changes:
- Removes the 11-parameter runtime limit.
- Adds a 32-argument integration test and doctests for the 32/33-parameter boundary.
- Documents the supported limit and records the fix in the changelog.
| File | Description |
|---|---|
src/tests/rust_guests/simpleguest/src/main.rs |
Adds a 32-parameter guest function for testing. |
src/hyperlight_host/tests/sandbox_host_tests.rs |
Tests a host call with 32 arguments. |
src/hyperlight_guest_macro/src/lib.rs |
Documents the 32-parameter limit. |
src/hyperlight_guest_bin/src/guest_function/definition.rs |
Removes the 11-parameter rejection while preserving signature checks. |
src/hyperlight_common/src/func/param_type.rs |
Adds doctests accepting 32 parameters and rejecting 33. |
CHANGELOG.md |
Records the guest-call fix. |
Review effort: Balanced
andreiltd
approved these changes
Oct 29, 2026
jsturtevant
approved these changes
Oct 29, 2026
Benchmark ResultsMeasured commit: kvm / amd (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
kvm / intel (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
mshv3 / amd (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
mshv3 / intel (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
hyperv-ws2025 / amd (Windows) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
hyperv-ws2025 / intel (Windows) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
Reported by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Guest functions register with up to 32 parameters, but
verify_parametersrejected every call with more than 11. This removes the limit. The guest still rejects a call whose argument count differs from the function's parameter count.Tests:
ParameterTuple: 32 parameters compile, 33 do not.Fixes #1996