Skip to content

Conversation

arnaud-lb
Copy link
Member

@arnaud-lb arnaud-lb commented Oct 20, 2025

Effects performed after a get_property_ptr_ptr() call may make the property pointer invalid by freeing or reallocating its container.

The container might be the object itself, the properties ht, a proxied object. For internal classes, this can be anything else.

Here we change the get_property_ptr_ptr handler so it exposes the actual container. The caller can then increase its refcount if any operation performed before the last access to the property could render the property invalid.

The get_property_ptr_ptr() implementation has the responsibility of ensuring that while the container's refcount is incremented, the property pointer remains valid.

Possible partial fix for GH-15938. Separate fixes are necessary for ASSIGN_DIM_OP, ASSIGN_OP, and references.

cc @iluuu1994 @nielsdos

Effects performed after a get_property_ptr_ptr() call may make the property
pointer invalid by freeing or reallocating its container.

The container might be the object itself, the properties ht, a proxied object,
or anything else (for internal classes).

Here we change the get_property_ptr_ptr handler so it exposes the actual
container. The caller can then increase its refcount if any operation performed
before the last access to the property could render the property invalid.

The get_property_ptr_ptr() implementation has the responsibility of ensuring
that while the container's refcount is incremented, the property pointer remains
valid.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant