-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ilasm produces wrong SequencePoints when a method references several Documents #102198
Labels
Comments
dotnet-issue-labeler
bot
added
the
needs-area-label
An area label is needed to ensure this gets routed to the appropriate area owners
label
May 14, 2024
dotnet-policy-service
bot
added
the
untriaged
New issue has not been triaged by the area owner
label
May 14, 2024
yjaradin
added a commit
to yjaradin/dotnet-runtime
that referenced
this issue
May 14, 2024
Make sure the SequencePoints produced in the PDB reference the documents indicated on the .line directive. Fix dotnet#102198
jkotas
added
area-ILTools-coreclr
and removed
needs-area-label
An area label is needed to ensure this gets routed to the appropriate area owners
labels
May 14, 2024
Tagging subscribers to this area: @JulieLeeMSFT |
noahfalk
pushed a commit
that referenced
this issue
May 27, 2024
* ilasm support for methods with multiple documents Make sure the SequencePoints produced in the PDB reference the documents indicated on the .line directive. Fix #102198 * Clean up ilasm PortablePdb tests --------- Co-authored-by: Ivan Povazan <[email protected]>
dotnet-policy-service
bot
removed
the
untriaged
New issue has not been triaged by the area owner
label
May 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When a method contains
.line
directives referring to several documents,ilasm
ignores all but the last specified document.This in turn impacts tools (such as Visual Studio) that will, for example, show the wrong file (and therefore an irrelevant line) when stepping through the built code.
Reproduction Steps
After having built the tests, run the following program.
For reference, here is TestsDocuments1_win.il:
Expected behavior
The following output is expected (on Windows, on other platforms the paths will be different but the important digit would be the same):
Actual behavior
The following output is produced (again, on Windows with slight changes to the paths but not the digits on other platforms):
Regression?
This is a functional regression compared to .NET Framework although it used a different (non-portable) PDB file format.
Known Workarounds
Using .NET Framework where practical.
Configuration
Observed on:
.NET 6 -> .NET 9 (preview 3)
Windows 10 x64, Windows 11 x64
Not specific to that configuration
Other information
The issue is in the method
runtime/src/coreclr/ilasm/portable_pdb.cpp
Line 201 in 039d2ec
currSeqPoint
outside the loop).I have a fix and a test for this issue that will be in an upcoming PR.
The text was updated successfully, but these errors were encountered: