Skip to content

fix(core): result check for async function - #1355

Merged
alexcrichton merged 2 commits into
bytecodealliance:mainfrom
vados-cosmonic:fix(core)=async-function-result-check
Aug 18, 2025
Merged

fix(core): result check for async function#1355
alexcrichton merged 2 commits into
bytecodealliance:mainfrom
vados-cosmonic:fix(core)=async-function-result-check

Conversation

@vados-cosmonic

Copy link
Copy Markdown
Contributor

This commit fixes a check that was incorrectly looking at the CM level function in the case of an async guest import when determining whether it had the right results.

The problem with the existing logic is that it was trying to check for a constraint on the wrong function -- the guest import being lowered rather than the core function underneath that.

The case that makes this obvious was something like an run: async func() where the CM level function clearly has no result, but the underlying core function being async lifted must of course have a i32 status code as a result.

This commit fixes a check that was incorrectly looking at the CM level
function in the case of an async guest import when determining whether
it had the right results.

The problem with the existing logic is that it was trying to check for
a constraint on the wrong function -- the guest import being lowered
rather than the core function underneath that.

The case that makes this obvious was something like an `run: async
func()` where the CM level function clearly has no result, but the
underlying core function being async lifted must of course have a i32
status code as a result.
@vados-cosmonic
vados-cosmonic force-pushed the fix(core)=async-function-result-check branch from 19de614 to b496f76 Compare August 16, 2025 06:07
@alexcrichton
alexcrichton enabled auto-merge August 18, 2025 17:31
@alexcrichton
alexcrichton added this pull request to the merge queue Aug 18, 2025
Merged via the queue into bytecodealliance:main with commit 92cca96 Aug 18, 2025
38 of 44 checks passed
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