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

Use correct IL offset when reporting dataflow warnings for return statements - #105661

#105661
Merged
sbomer merged 6 commits into
dotnet:maindotnet/runtime:mainfrom
sbomer:trackReturnOffsetsbomer/runtime:trackReturnOffsetCopy head branch name to clipboard
Aug 7, 2024
Merged

Use correct IL offset when reporting dataflow warnings for return statements#105661
sbomer merged 6 commits into
dotnet:maindotnet/runtime:mainfrom
sbomer:trackReturnOffsetsbomer/runtime:trackReturnOffsetCopy head branch name to clipboard

Conversation

@sbomer

@sbomer sbomer commented Jul 29, 2024

Copy link
Copy Markdown
Member

Instead of merging all returned values into a single return value and reporting warnings based on that, report warnings per return statement, using the IL offset at that point. This allows us to fix the message origin to match the IL offset of each individual return statement, so we can remove a workaround from the pattern store.

Fixes dotnet/linker#2778

@dotnet/appmodel PTAL

@sbomer
sbomer requested a review from vitek-karas July 29, 2024 22:17
@ghost ghost added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jul 29, 2024
@sbomer
sbomer force-pushed the trackReturnOffset branch from eafaa6d to 0447405 Compare July 29, 2024 23:20
Comment thread src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/MethodBodyScanner.cs Outdated
@sbomer

sbomer commented Aug 6, 2024

Copy link
Copy Markdown
Member Author

@vitek-karas @MichalStrehovsky PTAL

@am11 am11 added linkable-framework Issues associated with delivering a linker friendly framework area-Tools-ILLink .NET linker development as well as trimming analyzers and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Aug 6, 2024
Comment thread src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/MethodBodyScanner.cs Outdated

@vitek-karas vitek-karas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice - thanks a lot.

…thodBodyScanner.cs

Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
@sbomer
sbomer merged commit be6184f into dotnet:main Aug 7, 2024
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 7, 2024
@sbomer
sbomer deleted the trackReturnOffset branch June 26, 2026 18:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Tools-ILLink .NET linker development as well as trimming analyzers linkable-framework Issues associated with delivering a linker friendly framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linker tracks wrong IL offset for return values

4 participants

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