Skip to content

StackFrame.GetILOffset returns -1 for ReJITted methods #8296

Description

@pharring

Title says it all. This was tested on CoreCLR 2.0.0-preview2-006098 and desktop .Net 4.6.2
To be clear, this is System.Diagnostics.StackFrame.GetILOffset()
I can give background offline, if required, but @noahfalk has the details.

Activity

  1. self-assigned this
    on Jun 6, 2017
  2. lt72 commented on Jun 7, 2017

    @lt72
    Contributor

    @noahfalk: PTAL

  3. noahfalk commented on Jun 7, 2017

    @noahfalk
    Member

    @lt72 - Its a known pre-existing issue that this doesn't work properly, but it would be good to fix. Working around it isn't pleasant and we definately can't afford to have tiered jitting cause a similar impact.

  4. AndyAyersMS commented on Jun 7, 2017

    @AndyAyersMS
    Member

    @noahfalk can you expound a bit more on why it doesn't work, and roughly what needs to be fixed?

  5. noahfalk commented on Jun 7, 2017

    @noahfalk
    Member

    The issue I'm aware of (which may not be the only issue present) is a lock ordering problem. We've got both the original IL->native offset data and the rejit provided IL'->IL mapping data, but they are in data structures the code can't easily access due to lock ordering. I'm guessing a potential solution is to avoid dealing with the cached IL->native data held under the debugger lock and instead go directly to the lower level IL->native data being maintained by the codemanager.

    If you were worried that this might be JIT related I don't think there is any issue in that area.

  6. noahfalk commented on Jun 7, 2017

    @noahfalk
    Member

    If someone is planning on working on this in the near term I'm happy to go into more detail, I just didn't expect this would get any traction right away.

  7. assigned and unassigned on Nov 7, 2017
  8. lt72 commented on Nov 7, 2017

    @lt72
    Contributor

    @davmason: PTAL

  9. lt72 commented on Feb 21, 2018

    @lt72
    Contributor

    @davmason: did you get a chance to dig more into this?

  10. transferred this issue fromdotnet/coreclron Jan 31, 2020
  11. added this to the Future milestone on Jan 31, 2020
  12. ghost added
    backlog-cleanup-candidateAn inactive issue that has been marked for automated closure.
    on Oct 27, 2022
  13. ghost closed this as completedon Nov 10, 2022
  14. ghost locked as resolved and limited conversation to collaborators on Dec 10, 2022
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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions