microsoft / microsoft/win32metadata
Determine if we need to do something re: nonmoveable structures
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 149
- Avg merge
- 5d 16h
- Merged PRs (30d)
- 4
Description
Pulled out of #1821 so we don't lose it.
`CREDENTIALW` is an interesting related case. It isn't _empty_ in the metadata, nor should it be. But [`CredReadW`](https://learn.microsoft.com/en-us/windows/win32/api/wincred/nf-wincred-credreadw) returns a `PCREDENTIALW` that is important to not copy around. The original pointer is native allocated memory that must be freed via the original pointer. Further, the struct may point to addresses outside itself but within the same memory allocation. So it's important that projections _not_ simply copy the struct and/or release the memory and expect the copy to be self-contained.
I think these fall in with the native classes mentioned in the description, in that the metadata should be able to indicate that this type should never be dereferenced for purposes of copying around, as the original pointer is important.
_Originally posted by @AArnott in https://github.com/microsoft/win32metadata/issues/1821#issuecomment-1917749940_
Contributor guide
Research direction
Start by reading the parent issue #1821 and the referenced CredReadW behavior, then inspect how metadata currently represents native classes and structures used by projections. Done means the project has a decided metadata approach for nonmoveable structures such as CREDENTIALW, with the affected generation or projection behavior and validation identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- operating-systems, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100