-
Notifications
You must be signed in to change notification settings - Fork 5.2k
X86 Debug Stack offsets are encoded divided by 4 #58070
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
Conversation
- Fix the encoding Fixes dotnet#57951
AndyAyersMS
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like that should do the trick.
Can you verify the new R2R debug info for x86 Task.WaitAll looks right?
trylek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks David for fixing this so quickly!
| throw new BadImageFormatException("Unexpected var loc type"); | ||
| } | ||
|
|
||
| static void WriteEncodedStackOffset(NibbleWriter _writer, int offset, bool assume4ByteAligned) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit - if at some point we considered expanding this behavior to other architectures, the name of the argument (assume4ByteAligned) would probably need to change to e.g. something like encodeUsingPointerSizeUnits or some such. If we believe this to be limited to X86 forever, it's probably OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just checked to see how valuable this really is, and we could save something like 0.08% of System.Private.CoreLib.dll size if we applied a similar size optimization on X64. I don't see that as worthwhile given the complexity it would impose on the reader in the runtime.
|
@AndyAyersMS Yep. Verified the WaitAll behavior, and it looks good. |
|
/backport to release/6.0-rc1 |
|
Started backporting to release/6.0-rc1: https://github.com/dotnet/runtime/actions/runs/1165066676 |
| } | ||
|
|
||
| public void InitializeDebugVarInfos(NativeVarInfo[] debugVarInfos) | ||
| public void InitializeDebugVarInfos(NativeVarInfo[] debugVarInfos, TargetDetails target) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TargetDetails are available in _method.Context.Target. The additional parameter caused an unnecessary NativeAOT build break.
Fixes #57951