gh-149049: Fix jit binary op stack underflow#149076
gh-149049: Fix jit binary op stack underflow#149076eendebakpt wants to merge 4 commits intopython:mainfrom
Conversation
markshannon
left a comment
There was a problem hiding this comment.
Looks correct, but the handling of _BINARY_OP looks fragile. I've a suggestion on how to fix that.
| } | ||
| res = PyJitRef_MakeUnique(sym_new_type(ctx, &PyFloat_Type)); | ||
| } | ||
| // The branches above emit a specialized binary op; every branch below |
There was a problem hiding this comment.
Rather than emit, in each branch, a variant of _BINARY_OP and hope that you haven't missed one. Set the op to be emitted and emit it at the end.
At the start: emit_op = _BINARY_OP
For a specialization set emit_op, e.g. emit_op = _BINARY_OP_TRUEDIV_FLOAT
and then, at the end, ADD_OP(emit_op, oparg, 0);
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
Since this is fixing a reported bug, it will need a news entry. |
Stack underflow (depth = -1)#149049