Skip to content

[3.11] gh-125703: Correctly honour tracemalloc hooks on specialized DECREF paths (GH-125704) #125706

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Include/internal/pycore_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
#ifdef Py_TRACE_REFS
_Py_ForgetReference(op);
#endif
struct _reftracer_runtime_state *tracer = &_PyRuntime.ref_tracer;

Check failure on line 47 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Address sanitizer

‘_PyRuntimeState’ {aka ‘struct pyruntimestate’} has no member named ‘ref_tracer’

Check failure on line 47 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build and test (x64)

'ref_tracer': is not a member of 'pyruntimestate' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 47 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build and test (x64)

'ref_tracer': is not a member of 'pyruntimestate' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 47 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

'ref_tracer': is not a member of 'pyruntimestate' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 47 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

'ref_tracer': is not a member of 'pyruntimestate' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 47 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test

‘_PyRuntimeState’ {aka ‘struct pyruntimestate’} has no member named ‘ref_tracer’
if (tracer->tracer_func != NULL) {

Check failure on line 48 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Address sanitizer

invalid use of undefined type ‘struct _reftracer_runtime_state’

Check failure on line 48 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build and test (x64)

left of 'tracer_func' specifies undefined struct/union '_reftracer_runtime_state' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 48 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build and test (x64)

left of 'tracer_func' specifies undefined struct/union '_reftracer_runtime_state' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 48 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

left of 'tracer_func' specifies undefined struct/union '_reftracer_runtime_state' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 48 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

left of 'tracer_func' specifies undefined struct/union '_reftracer_runtime_state' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 48 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test

dereferencing pointer to incomplete type ‘struct _reftracer_runtime_state’
void* data = tracer->tracer_data;

Check failure on line 49 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Address sanitizer

invalid use of undefined type ‘struct _reftracer_runtime_state’

Check failure on line 49 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build and test (x64)

left of 'tracer_data' specifies undefined struct/union '_reftracer_runtime_state' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 49 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build and test (x64)

left of 'tracer_data' specifies undefined struct/union '_reftracer_runtime_state' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 49 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

left of 'tracer_data' specifies undefined struct/union '_reftracer_runtime_state' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 49 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

left of 'tracer_data' specifies undefined struct/union '_reftracer_runtime_state' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
tracer->tracer_func(op, PyRefTracer_DESTROY, data);

Check failure on line 50 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Address sanitizer

invalid use of undefined type ‘struct _reftracer_runtime_state’

Check failure on line 50 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Address sanitizer

‘PyRefTracer_DESTROY’ undeclared (first use in this function)

Check failure on line 50 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build and test (x64)

left of 'tracer_func' specifies undefined struct/union '_reftracer_runtime_state' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 50 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build and test (x64)

'PyRefTracer_DESTROY': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 50 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build and test (x64)

left of 'tracer_func' specifies undefined struct/union '_reftracer_runtime_state' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 50 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build and test (x64)

'PyRefTracer_DESTROY': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 50 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

left of 'tracer_func' specifies undefined struct/union '_reftracer_runtime_state' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 50 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

'PyRefTracer_DESTROY': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 50 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

left of 'tracer_func' specifies undefined struct/union '_reftracer_runtime_state' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 50 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

'PyRefTracer_DESTROY': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 50 in Include/internal/pycore_object.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test

‘PyRefTracer_DESTROY’ undeclared (first use in this function)
}
destruct(op);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Correctly honour :mod:`tracemalloc` hooks in specialized ``Py_DECREF``
paths. Patch by Pablo Galindo
Loading