Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

jashook
Copy link

@jashook jashook commented Jul 26, 2019

Description

Silent bad codegen when compiling a method with a multislot struct argument in the caller, who has a fast tail call which re-uses the caller's stack outgoing arg space.

Customer impact

There are no currently known customers. There have been related issues in the past, but not issues filed with >16 byte structs. That being said, there is a precedent of finding these sort of problems in release once released :(. See #24858 for a very similar issue.

Regression

This is not a regression. It goes back to coreclr 1.0.

Risk

Any method in Tier 1 which is a fast tail call candidate, which also has a >16 byte struct on unix is a possible candidate for incorrect codegen. The result would be random, incorrect values passed to the callee.

Original issue:

https://github.com/dotnet/coreclr/issues/25884

/cc @dotnet/jit-contrib
/cc @sergiy-k

* Do not fast tail call if caller has multislot structs

* apply patch

* Address offline feedback
@jashook jashook added this to the 3.0 milestone Jul 26, 2019
@sergiy-k
Copy link

@jashook, please feel to merge this change if you and @AndyAyersMS are happy with the fix. Silent bad codegen is bad. :)

@jashook
Copy link
Author

jashook commented Jul 28, 2019

Will merge before the branch closes. I assume, @AndyAyersMS wont comment as it is Sunday. However, we have discussed the change that went into master (#25885). This change will force slightly less fast tail call decisions at the expense of generating correct fast tail calls..

I am happy with the change and will merge soon. Thank you for looking over the weekend @sergiy-k

@sergiy-k
Copy link

Thanks!

@jashook jashook merged commit ca3c39c into dotnet:release/3.0 Jul 28, 2019
@jashook
Copy link
Author

jashook commented Jul 28, 2019

Thank you @AndyAyersMS for the review!

@jashook jashook deleted the port_25885 branch July 28, 2019 22:44
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.

3 participants