Skip to content

memoryview Cross-Interpreter Data Has Some Minor Issues #132776

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
ericsnowcurrently opened this issue Apr 21, 2025 · 0 comments
Closed

memoryview Cross-Interpreter Data Has Some Minor Issues #132776

ericsnowcurrently opened this issue Apr 21, 2025 · 0 comments
Assignees
Labels
3.14 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-subinterpreters type-bug An unexpected behavior, bug, or error

Comments

@ericsnowcurrently
Copy link
Member

ericsnowcurrently commented Apr 21, 2025

Bug report

Bug description:

  • dealloc is incomplete
  • errors aren't handled quite right
  • buffer not cleaned up if xidata never used
  • some minor cleanup is needed

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

@ericsnowcurrently ericsnowcurrently added 3.14 new features, bugs and security fixes topic-subinterpreters type-bug An unexpected behavior, bug, or error labels Apr 21, 2025
@ericsnowcurrently ericsnowcurrently self-assigned this Apr 21, 2025
ericsnowcurrently added a commit that referenced this issue Apr 22, 2025
This change covers the following:

* dealloc: no cleanup if no buffer set
* dealloc: handle already-destroyed interpreter correctly
* handle errors in _memoryview_from_xid() correctly
* clean up the buffer if the xidata is never used
@picnixz picnixz added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Apr 24, 2025
ericsnowcurrently added a commit that referenced this issue Apr 25, 2025
* add notes
* rename XIBufferViewObject to xibufferview
* move memoryview XIData code to memoryobject.c
@github-project-automation github-project-automation bot moved this from Todo to Done in Subinterpreters Apr 25, 2025
ericsnowcurrently added a commit that referenced this issue Apr 25, 2025
…-132960)

This is a partial revert of gh-132821.  It resolves the refleak introduced by that PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.14 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-subinterpreters type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

No branches or pull requests

2 participants