Skip to content
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

gh-124855: Don't allow the JIT and perf support to be active at the same time #124856

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Oct 1, 2024

… the same time

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Python/sysmodule.c Outdated Show resolved Hide resolved
Python/sysmodule.c Outdated Show resolved Hide resolved
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
Python/sysmodule.c Outdated Show resolved Hide resolved
@diegorusso
Copy link
Contributor

Do we need to update the documentation here? https://docs.python.org/3.14/library/sys.html#sys.activate_stack_trampoline

@pablogsal
Copy link
Member Author

Good call!

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
@pablogsal pablogsal enabled auto-merge (squash) October 29, 2024 23:35
@pablogsal pablogsal added the type-bug An unexpected behavior, bug, or error label Oct 29, 2024
#ifdef _Py_JIT
_PyOptimizerObject* optimizer = _Py_GetOptimizer();
if (optimizer != NULL) {
PyErr_SetString(PyExc_ValueError, "Cannot activate the perf trampoline if the JIT is active");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're forgetting a Py_DECREF(optimizer) I think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pablogsal I'm pretty certain there's a refleak here :(

Copy link
Member Author

@pablogsal pablogsal Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On it, sorry I had this on auto-land and I missed your comment :(

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pablogsal pablogsal merged commit 2d37c71 into python:main Oct 30, 2024
41 checks passed
@pablogsal pablogsal deleted the nojit branch October 30, 2024 00:12
pablogsal added a commit to pablogsal/cpython that referenced this pull request Oct 30, 2024
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants