-
-
Notifications
You must be signed in to change notification settings - Fork 36.6k
gh-157468: Validate correct builtins used under JIT #157766
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
base: main
Are you sure you want to change the base?
Changes from all commits
313396f
b3f104f
f77395f
df1e636
f828617
290838c
e4f54de
6dde8ad
1a10677
b63f26c
73c4314
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| Fix the JIT optimizer folding a builtin name to a constant taken from the | ||
| interpreter's builtins dictionary even when the running function uses a | ||
| different ``__builtins__`` mapping, such as one created with | ||
| ``vars(builtins).copy()``. The optimizer now only folds when the function's | ||
| builtins is the interpreter's, and the folded constant is guarded at runtime so | ||
| that another function sharing the same code object but a different builtins | ||
| mapping does not use it. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
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.
Why are you adding the same instruction twice?My mistake.
convert_global_to_constconverts the input inplace and relies on its being copied. We should probably update its interface, but that's for a different PR.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.
The two
ADD_OPcalls emit different instructions: