Skip to content

do not crash on __delitem__#235

Open
mildsunrise wants to merge 1 commit intopython-cffi:mainfrom
mildsunrise:delitem-check
Open

do not crash on __delitem__#235
mildsunrise wants to merge 1 commit intopython-cffi:mainfrom
mildsunrise:delitem-check

Conversation

@mildsunrise
Copy link
Copy Markdown

@mildsunrise mildsunrise commented Mar 20, 2026

what it says on the tin: we're forgetting to check for deletions in many cases, so it's easy to crash the python process by doing del pointer[slice] or del buffer[anything]

@mattip
Copy link
Copy Markdown
Contributor

mattip commented Mar 20, 2026

Please add a test that fails before, passes after

@mildsunrise
Copy link
Copy Markdown
Author

done. i don't it's possible to test in a way that fails instead of invoking UB... in this case i think it's mostly guaranteed to be a crash though

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants