gh-137838: Fix JIT trace buffer overrun by increasing possible exit stubs#138177
gh-137838: Fix JIT trace buffer overrun by increasing possible exit stubs#138177corona10 merged 8 commits intopython:mainfrom
Conversation
|
Might be better approach than #138173, but issue is that max_length will be shorter than current, not sure that this apporach will be fine. |
| // Need space for _DEOPT | ||
| max_length--; | ||
|
|
||
| max_length-=2; |
There was a problem hiding this comment.
Needs comment on why 2:
// One for possible _DEOPT, one because _CHECK_VALIDITY itself might _DEOPT
Fidget-Spinner
left a comment
There was a problem hiding this comment.
LGTM. Will wait for Mark to agree.
|
Gentle ping @markshannon: I plan to create a separate PR to move this to the thread state after merging this PR. |
| # deallocators may be traced as well. | ||
| def setUp(self): | ||
| if os.environ.get('PYTHON_UOPS_OPTIMIZE') == '0': | ||
| self.skipTest("Line tracing behavior differs when JIT optimizer is disabled") |
There was a problem hiding this comment.
Wait, why/how does the behavior differ? Sounds like a bug.
There was a problem hiding this comment.
Probably should open another issue for this.
| char *env_var = Py_GETENV("PYTHON_UOPS_OPTIMIZE"); | ||
| bool is_noopt = true; | ||
| if (env_var == NULL || *env_var == '\0' || *env_var > '0') { | ||
| is_noopt = false; | ||
| } |
There was a problem hiding this comment.
Why was this change made? I think the previous code (without the additional variable) made more sense.
Uh oh!
There was an error while loading. Please reload this page.