Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Bad hash code calculation in PSMethodInvocationConstraints results in explosion of static cache #24964

Copy link
Copy link
@crazyjncsu

Description

@crazyjncsu
Issue body actions

The hash code calculation in PSMethodInvocationConstraints only counts in the array members but not their elements, so the returned hash code would be different for two PSMethodInvocationConstraints instances that hold exactly the same elements in their array members.

The hash code of PSMethodInvocationConstraints is used by the static cache PSInvokeMemberBinder.s_binderCache because PSMethodInvocationConstraints is a member of the key for that cache, so you end up with every request being a cache miss in PSInvokeMemberBinder.s_binderCache.

=> HashCode.Combine(MethodTargetType, ParameterTypes, GenericTypeParameters);

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    7.5-regressionThe issue is a regressionThe issue is a regressionIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the product

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.