[cDAC] fix ICF function logic#120301
Merged
max-charlamb merged 1 commit intodotnet:mainfrom Oct 2, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the logic for determining if an InlinedCallFrame has a function in the cDAC (contract-based data access component). The changes correct both the pointer size check condition and the bitmask comparison to match the runtime implementation.
Key Changes
- Corrects the pointer size condition from checking for 32-bit to checking for 64-bit systems
- Inverts the bitmask logic to check for equality with 0 instead of inequality
Comments suppressed due to low confidence (1)
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/StackWalk/FrameHandling/FrameIterator.cs:257
- Using
sizeof(ulong)to check for 64-bit systems is unclear. Consider using a more explicit constant like8orIntPtr.Sizeon a 64-bit system, or define a constant that clearly indicates this is checking for 64-bit pointer size.
if (target.PointerSize == sizeof(ulong))
Contributor
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
davidwrighton
approved these changes
Oct 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This logic was previously reversed from the runtime. See:
runtime/src/coreclr/vm/frames.h
Lines 2171 to 2181 in ce6fab1
Todo: Add more SOS testing, CI should have caught this.