-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Clear inlinee callinfo from the catch of OP_TryFinally as well #4449
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
Clear inlinee callinfo from the catch of OP_TryFinally as well #4449
Conversation
|
Reopened against release/1.8. Addressed review comment |
|
How did you address @LouisLaf 's concerns from the previous PR? |
|
#4051 (comment) was regarding the use of the isInlineeCleared Boolean that I used to avoid do the stack walk and clear when there is a try catch/try finally nesting. The suggestion was to use a stack to restore previous state correctly. My 2nd commit in the PR addresses this. I had added isInlineeCleared bit to mark when we have cleared inlinee frames's callinfo count on an exception within a try finally enclosed in some try catch. |
rajatd
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.
![]()
89db484 to
a42c710
Compare
3890234 to
18ea70c
Compare
|
@dotnet-bot test OSX static_osx_osx_debug |
When we hit an exception and we have a try finally within a try catch. We will execute finally code by calling BailOnException. Since we inline into functions with try now, we will end up in inconsistent inlinee callinfo when we call the bailout code from finally. So add the walker and clear inlinee callinfo. Remove isInlineeCleared bit I had added isInlineeCleared bit to mark when we have cleared inlinee frames's callinfo count on an exception within a try finally enclosed in some try catch. I later checked this bit in the enclosing OP_TryCatch to make sure we don't walk the stack to clear info again. This is not needed, because if there was an expection within try finally, then we will bailout and never exercise the code in OP_TryCatch
When a stackoverflow happens within a try finally enclosed inside try catch, we have to do a stackwalk till we find the try catch frame, this means walking all the frames that caused the stackoverflow. This test takes longer than the default timeout value on xplat. Moving it to slow test.
18ea70c to
a29fd05
Compare
…TryFinally as well Merge pull request #4449 from meg-gupta:swandclearinlineinfo When we hit an exception and we have a try finally within a try catch. We will execute finally code by calling BailOnException. Since we inline into functions with try now, we will end up in inconsistent inlinee callinfo when we call the bailout code from finally. So add the walker and clear inlinee callinfo. Also move tryCatchAddr ctor inside a scope, so that it executes before user catch code. Fixes OS#14336922
…tch of OP_TryFinally as well Merge pull request #4449 from meg-gupta:swandclearinlineinfo When we hit an exception and we have a try finally within a try catch. We will execute finally code by calling BailOnException. Since we inline into functions with try now, we will end up in inconsistent inlinee callinfo when we call the bailout code from finally. So add the walker and clear inlinee callinfo. Also move tryCatchAddr ctor inside a scope, so that it executes before user catch code. Fixes OS#14336922
…o from the catch of OP_TryFinally as well Merge pull request #4449 from meg-gupta:swandclearinlineinfo When we hit an exception and we have a try finally within a try catch. We will execute finally code by calling BailOnException. Since we inline into functions with try now, we will end up in inconsistent inlinee callinfo when we call the bailout code from finally. So add the walker and clear inlinee callinfo. Also move tryCatchAddr ctor inside a scope, so that it executes before user catch code. Fixes OS#14336922
When we hit an exception and we have a try finally within a try catch. We will execute finally code by calling BailOnException.
Since we inline into functions with try now, we will end up in inconsistent inlinee callinfo when we call the bailout code from finally.
So add the walker and clear inlinee callinfo.
Also move tryCatchAddr ctor inside a scope, so that it executes before user catch code.
Fixes OS#14336922