You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that this only causes failures running as a 32bit process on a 64bit OS. The BeginPaint implementation doesn't reference the final field, but the WOW layer does.
It is fine to clarify a particular scenario is heavily impacted by this incorrect definition, but it doesn't change the definition is incorrect. It is possible to create a GC hole via heap corruption, that means it is suspect. This definition and any similar patterns should be scrutinized heavily because end-users are far less likely to have the experience to track down the problem this type of definition can cause.
It is fine to clarify a particular scenario is heavily impacted by this incorrect definition, but it doesn't change the definition is incorrect.
The point was to clarify a way these can get missed for a commonly used API. One would suspect that the majority of users are running as 64bit. It was not an attempt to lower the priority. :)
CsWin32 gets this right when allowMarshaling=true. So this is unique to allowMarshaling=false. This seems really similar to #597, so I'm surprised fixing that didn't fix this. I'll try to look into this by early next week. Or Lachlan Ennis (@elachlan), as you have been great at investigating these so far, you're welcome to grab it.
I am seeing this when running as a 64-bit process too.
Yeah, I was looking at the wrong endpoint. BeginPaint is actually NtUserBeginPaint, which always does a copy. I suspect we're not seeing runtime failures on x64 due to padding/alignment.
Activity
JeremyKuhne commentedon Jul 27, 2022
cc: Aaron R Robinson (@AaronRobinsonMSFT)
JeremyKuhne commentedon Jul 27, 2022
Note that this only causes failures running as a 32bit process on a 64bit OS. The
BeginPaintimplementation doesn't reference the final field, but the WOW layer does.AaronRobinsonMSFT commentedon Jul 27, 2022
It is fine to clarify a particular scenario is heavily impacted by this incorrect definition, but it doesn't change the definition is incorrect. It is possible to create a GC hole via heap corruption, that means it is suspect. This definition and any similar patterns should be scrutinized heavily because end-users are far less likely to have the experience to track down the problem this type of definition can cause.
JeremyKuhne commentedon Jul 27, 2022
The point was to clarify a way these can get missed for a commonly used API. One would suspect that the majority of users are running as 64bit. It was not an attempt to lower the priority. :)
elachlan commentedon Jul 27, 2022
Won't this be in the metadata https://github.com/microsoft/win32metadata?
elachlan commentedon Jul 28, 2022
related issue: microsoft/win32metadata#215
elachlan commentedon Jul 28, 2022
This is the underlying generated code for the rgbReserved field:
internal __byte_32 rgbReserved;AArnott commentedon Jul 28, 2022
CsWin32 gets this right when
allowMarshaling=true. So this is unique toallowMarshaling=false. This seems really similar to #597, so I'm surprised fixing that didn't fix this. I'll try to look into this by early next week. Or Lachlan Ennis (@elachlan), as you have been great at investigating these so far, you're welcome to grab it.AaronRobinsonMSFT commentedon Jul 28, 2022
I am seeing this when running as a 64-bit process too.
JeremyKuhne commentedon Jul 28, 2022
Yeah, I was looking at the wrong endpoint.
BeginPaintis actuallyNtUserBeginPaint, which always does a copy. I suspect we're not seeing runtime failures on x64 due to padding/alignment.JeremyKuhne commentedon Jul 28, 2022
Andrew Arnott (@AArnott) we're out of date here- we are using 0.2.1, so this is probably fixed. Validating.
JeremyKuhne commentedon Jul 28, 2022
Yes, updating to 0.2.10 fixes the problem. Sorry for the noise!