-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix TryEnsureSufficientExecutionStack with interpreter #122248
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
Fix TryEnsureSufficientExecutionStack with interpreter #122248
Conversation
The ReflectionInvocation::TryEnsureSufficientExecutionStack was not taking into account the fact that with interpreter enabled, the code can be executed either by the interpreter or it can be AOTed. The interpreter has its own stack with its own limit. 3 libraries tests suites were failing due to this problem. As a best effort fix, this change adds check for the interpreter stack too and the method returns true only if there is enough space on both real and the interpreter stack, as it is not possible to decide which of them will be used.
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
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.
Pull request overview
This PR fixes a bug in TryEnsureSufficientExecutionStack where the interpreter's stack was not being checked. The method now correctly checks both the native stack and the interpreter stack when the interpreter is enabled, ensuring that code execution has sufficient stack space regardless of whether it's executed by the interpreter or AOT-compiled code.
Key Changes:
- Added interpreter stack checking alongside existing native stack checking
- Uses the same minimum stack size thresholds as the native stack (128KB on 64-bit, 64KB on 32-bit)
- Returns true only when both stacks have sufficient space
|
/ba-g the issues are unrelated to the change |
The ReflectionInvocation::TryEnsureSufficientExecutionStack was not taking into account the fact that with interpreter enabled, the code can be executed either by the interpreter or it can be AOTed. The interpreter has its own stack with its own limit.
3 libraries tests suites were failing due to this problem.
As a best effort fix, this change adds check for the interpreter stack too and the method returns true only if there is enough space on both real and the interpreter stack, as it is not possible to decide which of them will be used.