-
Notifications
You must be signed in to change notification settings - Fork 113
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
UpdateProcThreadAttribute should use u32 for 'attribute' argument #872
Comments
I'm not sure how to handle this one. The API is defined as accepting a The constants are defined in https://github.com/microsoft/win32metadata/blob/main/generation/WinSDK/Partitions/Threading/main.cpp if someone can recommend how they should be changed to align with the API. |
There's a mismatch but I don't think we can do much here, due to ABI compatibility constraints. |
Are More generally there are places where the same constants are used for different sized types. Which doesn't play well with strong typing, so there's not really a solution in the general case. |
I think we had a similar discussion in #1502 (comment) where we discussed how various structures, enumerations, etc. may be used in third party code (e.g. libs) and seemingly innocuous deviations from the definitions may cause unintended side effects. (There were some godbolt examples in there demonstrating some optimizer shortcuts that would fail.) |
I absolutely agree we shouldn't be changing the ABI. Both of functions and structs. I'm less clear on integer widths of |
Closing for now. Reactivate if there's something actionable here. |
The argument
attribute
to UpdateProcThreadAttribute is ausize
, even though the attributes (such as PROC_THREAD_ATTRIBUTE_SECURITY_CAPABILITIES areu32
.The text was updated successfully, but these errors were encountered: