Skip to content

We rely on an undocumented property of GetUserProfileDirectoryW #141254

Description

@RalfJung

The docs say that the size is written on failure, but in practice it is also written on success and we rely on that. See #141244 and rust-lang/miri#4332.

We shouldn't use system APIs outside their documented contract, so we should either adjust our implementation or get Microsoft to update the docs to promise this behavior we have been relying on.

Cc @ChrisDenton

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-windowsOperating system: WindowsT-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions