Skip to content

BUG: Make mmap handling safer in frombuffer#21446

Merged
charris merged 1 commit intonumpy:maintenance/1.22.xfrom
charris:backport-21324
May 5, 2022
Merged

BUG: Make mmap handling safer in frombuffer#21446
charris merged 1 commit intonumpy:maintenance/1.22.xfrom
charris:backport-21324

Conversation

@charris
Copy link
Copy Markdown
Member

@charris charris commented May 5, 2022

Backport of #21324.

frombuffer always used the old buffer protocol, but this is not
safe in some cases when combined with the "new" one.
The main/only use-case that was ever found for this is that enabling
the new buffer protocol (by going through a memoryview) protects
users from accidentally closing memorymaps while they are still used.

Closes gh-9537

`frombuffer` always used the old buffer protocol, but this is not
safe in some cases when combined with the "new" one.
The main/only use-case that was ever found for this is that enabling
the new buffer protocol (by going through a memoryview) protects
users from accidentally closing memorymaps while they are still used.

Closes numpygh-9537
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 08 - Backport Used to tag backport PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants