Skip to content

Save stack arguments size in InlinedCallFrame.m_Datum on x86 to handle callee's popping of arguments - #26834

Merged
fadimounir merged 4 commits into
dotnet:masterfrom
fadimounir:HandleStackPoppingPinvokes
Feb 4, 2020
Merged

fadimounir merged 4 commits into
dotnet:masterfrom
fadimounir:HandleStackPoppingPinvokes

Conversation

@fadimounir

Copy link
Copy Markdown
Contributor

Fix for #2230.

@fadimounir
fadimounir requested a review from jkotas January 31, 2020 22:14
@fadimounir

Copy link
Copy Markdown
Contributor Author

cc @dotnet/jit-contrib

@fadimounir

fadimounir commented Jan 31, 2020 •

Copy link
Copy Markdown
Contributor Author

I've been able to repro the issue with some stress testing before the fix. I currently have a couple of test instances running in a loop with the fix, and so far there are no crashes/asserts. I'll let it run over the weekend for validation

Comment thread src/coreclr/src/jit/lower.cpp Resolved

@jkotas jkotas 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.

Thanks!

Comment thread src/coreclr/src/jit/lower.cpp Outdated

@jkotas jkotas Feb 1, 2020 •

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.

Suggested change
#ifdef _TARGET_X86_
#if defined(TARGET_X86) && !defined(UNIX_X86_ABI)
  • The ifdefs were renamed recently.
  • This is for Windows only

@jkotas jkotas Feb 1, 2020 •

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.

This is for Windows only

For clarity, you can also move all logic inside InlinedCallFrame::UpdateRegDisplay that deals with stack argument sizes under !defined(UNIX_X86_ABI).

@fadimounir fadimounir Feb 3, 2020 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok, so what's the Unix ABI? Does the caller pop the arguments from the stack? Do we even now support Unix x86?

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.

Right

@fadimounir
fadimounir force-pushed the HandleStackPoppingPinvokes branch from 1e7a2e0 to 40fe834 Compare February 3, 2020 18:49

@jkotas jkotas 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.

Thanks!

@jkotas

jkotas commented Feb 3, 2020

Copy link
Copy Markdown
Member

src/coreclr/src/jit/lower.cpp has conflicts...

@fadimounir
fadimounir merged commit d4c2628 into dotnet:master Feb 4, 2020
jkotas added a commit that referenced this pull request Feb 5, 2020
…to handle callee's popping of arguments (#26834)"

This reverts commit d4c2628.
jkotas added a commit that referenced this pull request Feb 6, 2020
…to handle callee's popping of arguments (#26834)" (#31811)

This reverts commit d4c2628.
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants