Skip to content

ILStubManager::TraceManager does not correctly handle struct marshalling stubs #36248

Closed

Description

@jkoritzinsky

If a managed debugger tries to place a breakpoint at the start of an IL stub, the debugger uses the ILStubManager to place the breakpoint at a location where the user would expect it. For example, for P/Invoke calls it places it at the start of the native call, and for reverse P/Invoke calls, it places it at the start of the managed method.

The ILStubManager doesn't correctly handle struct marshaling stubs. They fall down the else case at the bottom that assumes that the method at that point is a COM call. From that point on we get into a very bad state and AV down the stack, which propagates up as an ExecutionEngineException.

This is the root cause of microsoft/CsWinRT#264.

Activity

  1. added this to the 5.0 milestone on May 11, 2020
  2. self-assigned this
    on May 11, 2020
  3. added
    untriaged
    on May 11, 2020
  4. removed
    untriaged
    on May 11, 2020
  5. added a commit that references this issue on May 11, 2020
    18ed94a
  6. added a commit that references this issue on May 12, 2020
    0cb7b82
  7. ghost locked as resolved and limited conversation to collaborators on Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions