Skip to content

stdlib: Fix the signature of _taskEscalate to return a priority #79762

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

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Mar 4, 2025

The swift_task_escalate is defined to return the new priority of the task after the escalation but the silgen_name'd function did not have the return type specified.

This is revealed by the following wasm linker warning:

wasm-ld: warning: function signature mismatch: swift_task_escalate
>>> defined as (i32, i32, i32, i32) -> void in /home/bot/.swiftpm/swift-sdks/swift-wasm-DEVELOPMENT-SNAPSHOT-2025-02-28-a-wasm32-unknown-wasi.artifactbundle/DEVELOPMENT-SNAPSHOT-2025-02-28-a-wasm32-unknown-wasi/wasm32-unknown-wasi/swift.xctoolchain/usr/lib/swift_static/wasi/libswift_Concurrency.a(_Concurrency.o)
>>> defined as (i32, i32, i32, i32) -> i32 in /home/bot/.swiftpm/swift-sdks/swift-wasm-DEVELOPMENT-SNAPSHOT-2025-02-28-a-wasm32-unknown-wasi.artifactbundle/DEVELOPMENT-SNAPSHOT-2025-02-28-a-wasm32-unknown-wasi/wasm32-unknown-wasi/swift.xctoolchain/usr/lib/swift_static/wasi/libswift_Concurrency.a(TaskStatus.cpp.o)

Follow up to 18c2584

The `swift_task_escalate` is defined to return the new priority of the
task after the escalation but the silgen_name'd function did not have
the return type specified.

Follow up to 18c2584
@kateinoigakukun kateinoigakukun requested a review from ktoso as a code owner March 4, 2025 11:46
@kateinoigakukun
Copy link
Member Author

@swift-ci test

@MaxDesiatov MaxDesiatov requested a review from al45tair March 4, 2025 14:01
@MaxDesiatov MaxDesiatov added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. WebAssembly Platform: WebAssembly labels Mar 4, 2025
@kateinoigakukun kateinoigakukun merged commit 4aeaab4 into swiftlang:main Mar 5, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. WebAssembly Platform: WebAssembly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants