Skip to content

Conversation

@markshannon
Copy link
Member

@markshannon markshannon commented Nov 2, 2023

Fixes GH-109369.
Adds a _CHECK_VALIDITY uop which is inserted after any escaping operations.
Ensures that uop traces will be exited promptly if the code is instrumented.

@markshannon markshannon marked this pull request as ready for review November 6, 2023 14:36
markshannon and others added 2 commits November 8, 2023 12:28
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@brandtbucher
Copy link
Member

So, on the JIT branch, we don't actually keep the executor handy when executing instructions (only when entering/exiting traces). I'm guessing we'll need it a lot more in the future once we start doing stitching and such, but I wonder: can we just stick it on the tstate or the frame? It feels a bit painful to dedicate a register to this thing, especially since it'll be hardly used in optimized traces (I think).

Not a big deal though, and can be deferred to a later date. Just something to ponder, or to do if it's easy now.

@brandtbucher
Copy link
Member

brandtbucher commented Nov 8, 2023

Idea: put the executor's address in _CHECK_VALIDITY's operand? Then the JIT would require no modifications to support this change.

@brandtbucher
Copy link
Member

Ah, never mind, the JIT can burn in the executor. I withdraw my comments. :)

@markshannon markshannon merged commit 25c4956 into python:main Nov 9, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@markshannon markshannon deleted the exit-if-invalid branch August 6, 2024 10:18
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants