-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
gh-142830: prevent some crashes when mutating sqlite3 callbacks
#143245
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
base: main
Are you sure you want to change the base?
Conversation
|
Actually, I'm a bit worried about backporting the change to 3.13 and 3.14 because we are now using a real heap type. |
|
🤖 New build scheduled with the buildbot fleet by @picnixz for commit 4dd0652 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F143245%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
| class Handler: | ||
| def __call__(self, statement): | ||
| # clear the progress handler | ||
| self.cx.set_progress_handler(None, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ups wrong test. I'll amend this tomorrow.
|
|
||
| #define pysqlite_CallbackContext_CAST(op) ((pysqlite_CallbackContext *)(op)) | ||
|
|
||
| /* Allocate a UDF/callback context structure. In order to ensure that the state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is outdated.
This is not a complete fix because there are other callbacks that need to be tested. I could technically split the PR into two but I preferred testing the conversion to
PyObject *in the same PR.sqlite3progress handler via re-entrant__bool__#142830