-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Several problems with _lsprof_Profiler_enable
#126425
Labels
Comments
sobolevn
added
type-bug
An unexpected behavior, bug, or error
extension-modules
C modules in the Modules dir
labels
Nov 5, 2024
sobolevn
added a commit
to sobolevn/cpython
that referenced
this issue
Nov 5, 2024
sobolevn
added a commit
that referenced
this issue
Nov 5, 2024
- Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects) - Respect possible errors of `sys.monitoring.register_callback` call
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Nov 5, 2024
- Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects) - Respect possible errors of `sys.monitoring.register_callback` call (cherry picked from commit 7587260) Co-authored-by: sobolevn <mail@sobolevn.me>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Nov 5, 2024
- Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects) - Respect possible errors of `sys.monitoring.register_callback` call (cherry picked from commit 7587260) Co-authored-by: sobolevn <mail@sobolevn.me>
This was referenced Nov 5, 2024
sobolevn
added a commit
that referenced
this issue
Nov 5, 2024
…6443) gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426) - Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects) - Respect possible errors of `sys.monitoring.register_callback` call (cherry picked from commit 7587260) Co-authored-by: sobolevn <mail@sobolevn.me>
sobolevn
added a commit
that referenced
this issue
Nov 5, 2024
…6442) gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426) - Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects) - Respect possible errors of `sys.monitoring.register_callback` call (cherry picked from commit 7587260) Co-authored-by: sobolevn <mail@sobolevn.me>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug report
There are several problems that I see with
_lsprof.Profiler.enable()
method:cpython/Modules/_lsprof.c
Lines 783 to 787 in d384050
PyErr_Clear()
call to show that this is intentionalNone
right now (which is immortal), but we still prefer to do the refcount for such objects, where possiblecpython/Modules/_lsprof.c
Lines 795 to 799 in d384050
I will send a PR.
Linked PRs
_lsprof_Profiler_enable
#126426_lsprof_Profiler_enable
(GH-126426) #126442_lsprof_Profiler_enable
(GH-126426) #126443The text was updated successfully, but these errors were encountered: