Skip to content

Detect unsupported array parameters#3402

Merged
kennykerr merged 4 commits intomicrosoft:masterfrom
iancormac84:fix-array-omission
Jan 6, 2025
Merged

Detect unsupported array parameters#3402
kennykerr merged 4 commits intomicrosoft:masterfrom
iancormac84:fix-array-omission

Conversation

@iancormac84
Copy link
Contributor

@iancormac84 iancormac84 commented Dec 22, 2024

This pull request fixes an issue where windows-bindgen confuses an unsupported trailing array parameter for a result value and then generates code that dereferences it and tries to return it.

@kennykerr I believe I have tracked down the source of the reintroduction of the bug that had been reported prior. You mentioned providing a minimal repro in #3384. I added a generated test in the code to ensure that it's working as expected. Please let me know if this is what you expected, and what else, if anything, that I need to do to get this pull request accepted. Thanks!

Fixes #3384

…ng array parameter that is confused for a result value and returned as such.
@iancormac84
Copy link
Contributor Author

@microsoft-github-policy-service agree

@kennykerr
Copy link
Collaborator

Oh, this looks like it impacts parameters that are attributed as array parameters but that are then discarded as invalid by windows-bindgen.

@iancormac84 iancormac84 marked this pull request as ready for review December 23, 2024 14:40
@kennykerr kennykerr changed the title Ensure that windows-bindgen properly processes certain methods and functions that have an unsupported trailing array parameter. Detect unsupported array parameters Jan 6, 2025
@kennykerr
Copy link
Collaborator

Builds are failing with latest Rust toolchain following the holidays - I'll work on that separately and then we can update these PRs.

@kennykerr kennykerr merged commit d02c977 into microsoft:master Jan 6, 2025
@iancormac84 iancormac84 deleted the fix-array-omission branch January 7, 2025 00:39
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.

All *GetIDsOfNames COM methods have incorrect return types/signatures

2 participants