Skip to content
Prev Previous commit
Next Next commit
Fix newline
  • Loading branch information
Fidget-Spinner committed May 23, 2022
commit 42a706c9597a7e7b06cc4380fef5a742053e083f
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Fix ``memoryview`` use after free when accessing the backing buffer in certain cases.
Fix ``memoryview`` use after free when accessing the backing buffer in certain cases.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose to mention more explicitly that the protection is about released views:

If a memoryview is released while getting or setting an item, raise an exception.
For example, converting an object to an index can execute arbitrary Python
code which can indirectly release the memoryview.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not always an exception is raised.

The bug was in reading or wring the freed memory. Now it is prevented -- you either get an exception or free the memory after reading. @Fidget-Spinner's description is more correct.

I am going to address such inconsistency in a separate issue.