Repository navigation
StackFrame.GetILOffset returns -1 for ReJITted methods #8296
Description
Activity
@noahfalk: PTAL
@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.
@noahfalk can you expound a bit more on why it doesn't work, and roughly what needs to be fixed?
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.
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.
@davmason: PTAL
@davmason: did you get a chance to dig more into this?
- ghost addedbacklog-cleanup-candidateAn inactive issue that has been marked for automated closure.An inactive issue that has been marked for automated closure.
on Oct 27, 2022 - ghost locked as resolved and limited conversation to collaborators
on Dec 10, 2022
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.